Skip to content

Commit e000f18

Browse files
eeemmmmmmclonker
authored andcommitted
Replace string comparison with empty() method in Parser
1 parent b1953d2 commit e000f18

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

libsolidity/parsing/Parser.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -217,7 +217,7 @@ void Parser::parsePragmaVersion(SourceLocation const& _location, std::vector<Tok
217217

218218
ASTPointer<StructuredDocumentation> Parser::parseStructuredDocumentation()
219219
{
220-
if (m_scanner->currentCommentLiteral() != "")
220+
if (!m_scanner->currentCommentLiteral().empty())
221221
{
222222
ASTNodeFactory nodeFactory{*this};
223223
nodeFactory.setLocation(m_scanner->currentCommentLocation());
@@ -1445,7 +1445,7 @@ ASTPointer<Statement> Parser::parseStatement(bool _allowUnchecked)
14451445
RecursionGuard recursionGuard(*this);
14461446
ASTPointer<ASTString> docString;
14471447
ASTPointer<Statement> statement;
1448-
if (m_scanner->currentCommentLiteral() != "")
1448+
if (!m_scanner->currentCommentLiteral().empty())
14491449
docString = std::make_shared<ASTString>(m_scanner->currentCommentLiteral());
14501450
switch (m_scanner->currentToken())
14511451
{

0 commit comments

Comments
 (0)