From fa0ce6a7e7abd5bbc9bad1dd15f54ea4e9b11f85 Mon Sep 17 00:00:00 2001 From: Alex Beregszaszi Date: Tue, 9 Oct 2018 04:29:37 +0100 Subject: Use empty() instead of size() == 0 --- libsolidity/analysis/SyntaxChecker.cpp | 2 +- libsolidity/analysis/TypeChecker.cpp | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) (limited to 'libsolidity/analysis') 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 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) { -- cgit