diff options
author | Alex Beregszaszi <alex@rtfs.hu> | 2018-10-09 11:29:37 +0800 |
---|---|---|
committer | Alex Beregszaszi <alex@rtfs.hu> | 2018-10-09 11:29:37 +0800 |
commit | fa0ce6a7e7abd5bbc9bad1dd15f54ea4e9b11f85 (patch) | |
tree | 40d4605d3e6c971f35ae667d5962b8e03b9df144 /libsolidity/analysis | |
parent | 4ab2e03be3e5550a68a2fcf1608cdcb942dd8957 (diff) | |
download | dexon-solidity-fa0ce6a7e7abd5bbc9bad1dd15f54ea4e9b11f85.tar.gz dexon-solidity-fa0ce6a7e7abd5bbc9bad1dd15f54ea4e9b11f85.tar.zst dexon-solidity-fa0ce6a7e7abd5bbc9bad1dd15f54ea4e9b11f85.zip |
Use empty() instead of size() == 0
Diffstat (limited to 'libsolidity/analysis')
-rw-r--r-- | libsolidity/analysis/SyntaxChecker.cpp | 2 | ||||
-rw-r--r-- | libsolidity/analysis/TypeChecker.cpp | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/libsolidity/analysis/SyntaxChecker.cpp b/libsolidity/analysis/SyntaxChecker.cpp index 0bc20f2e..b79fb156 100644 --- a/libsolidity/analysis/SyntaxChecker.cpp +++ b/libsolidity/analysis/SyntaxChecker.cpp @@ -76,7 +76,7 @@ bool SyntaxChecker::visit(PragmaDirective const& _pragma) { solAssert(m_sourceUnit, ""); vector<string> literals(_pragma.literals().begin() + 1, _pragma.literals().end()); - if (literals.size() == 0) + if (literals.empty()) m_errorReporter.syntaxError( _pragma.location(), "Experimental feature name is missing." diff --git a/libsolidity/analysis/TypeChecker.cpp b/libsolidity/analysis/TypeChecker.cpp index bc040623..39ea494d 100644 --- a/libsolidity/analysis/TypeChecker.cpp +++ b/libsolidity/analysis/TypeChecker.cpp @@ -2123,7 +2123,7 @@ bool TypeChecker::visit(MemberAccess const& _memberAccess) auto& annotation = _memberAccess.annotation(); - if (possibleMembers.size() == 0) + if (possibleMembers.empty()) { if (initialMemberCount == 0) { |