aboutsummaryrefslogtreecommitdiffstats
path: root/libsolidity/analysis
diff options
context:
space:
mode:
authorAlex Beregszaszi <alex@rtfs.hu>2018-10-09 11:29:37 +0800
committerAlex Beregszaszi <alex@rtfs.hu>2018-10-09 11:29:37 +0800
commitfa0ce6a7e7abd5bbc9bad1dd15f54ea4e9b11f85 (patch)
tree40d4605d3e6c971f35ae667d5962b8e03b9df144 /libsolidity/analysis
parent4ab2e03be3e5550a68a2fcf1608cdcb942dd8957 (diff)
downloaddexon-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.cpp2
-rw-r--r--libsolidity/analysis/TypeChecker.cpp2
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)
{