aboutsummaryrefslogtreecommitdiffstats
path: root/AST.cpp
diff options
context:
space:
mode:
authorLefteris Karapetsas <lefteris@refu.co>2015-04-02 23:05:27 +0800
committerLefteris Karapetsas <lefteris@refu.co>2015-04-17 21:27:31 +0800
commit52a442a100ef065ec36cc9e20f62f6d878347e6d (patch)
treed63a2acdbea954b3ae6d0765e6833b903b5cc2bf /AST.cpp
parentbeba2705ba2fd9f87bf76f439c4a99cec0f6a06d (diff)
downloaddexon-solidity-52a442a100ef065ec36cc9e20f62f6d878347e6d.tar.gz
dexon-solidity-52a442a100ef065ec36cc9e20f62f6d878347e6d.tar.zst
dexon-solidity-52a442a100ef065ec36cc9e20f62f6d878347e6d.zip
size()!=0 -> !empty()
Diffstat (limited to 'AST.cpp')
-rw-r--r--AST.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/AST.cpp b/AST.cpp
index 4d183889..a66aa989 100644
--- a/AST.cpp
+++ b/AST.cpp
@@ -323,7 +323,7 @@ void InheritanceSpecifier::checkTypeRequirements()
ContractDefinition const* base = dynamic_cast<ContractDefinition const*>(m_baseName->getReferencedDeclaration());
solAssert(base, "Base contract not available.");
TypePointers parameterTypes = ContractType(*base).getConstructorType()->getParameterTypes();
- if (m_arguments.size() != 0 && parameterTypes.size() != m_arguments.size())
+ if (!m_arguments.empty() && parameterTypes.size() != m_arguments.size())
BOOST_THROW_EXCEPTION(createTypeError("Wrong argument count for constructor call."));
for (size_t i = 0; i < m_arguments.size(); ++i)
if (!m_arguments[i]->getType()->isImplicitlyConvertibleTo(*parameterTypes[i]))