aboutsummaryrefslogtreecommitdiffstats
path: root/libsolidity/analysis
diff options
context:
space:
mode:
authorMathias Baumann <marenz@supradigital.org>2018-12-11 02:02:39 +0800
committerMathias Baumann <marenz@supradigital.org>2018-12-11 02:02:39 +0800
commit2f6dc2e773148f63f4e2b9d9b3f9bb7eb092fde8 (patch)
tree690b5cc720bb114ec614b74379b8551a8abf5c17 /libsolidity/analysis
parent871ea22bb9158e23254406d21673cfbeda2d7138 (diff)
downloaddexon-solidity-2f6dc2e773148f63f4e2b9d9b3f9bb7eb092fde8.tar
dexon-solidity-2f6dc2e773148f63f4e2b9d9b3f9bb7eb092fde8.tar.gz
dexon-solidity-2f6dc2e773148f63f4e2b9d9b3f9bb7eb092fde8.tar.bz2
dexon-solidity-2f6dc2e773148f63f4e2b9d9b3f9bb7eb092fde8.tar.lz
dexon-solidity-2f6dc2e773148f63f4e2b9d9b3f9bb7eb092fde8.tar.xz
dexon-solidity-2f6dc2e773148f63f4e2b9d9b3f9bb7eb092fde8.tar.zst
dexon-solidity-2f6dc2e773148f63f4e2b9d9b3f9bb7eb092fde8.zip
Replace push_back with emplace_back where it makes sense
Diffstat (limited to 'libsolidity/analysis')
-rw-r--r--libsolidity/analysis/ContractLevelChecker.cpp10
1 files changed, 5 insertions, 5 deletions
diff --git a/libsolidity/analysis/ContractLevelChecker.cpp b/libsolidity/analysis/ContractLevelChecker.cpp
index 6dc564de..526caff9 100644
--- a/libsolidity/analysis/ContractLevelChecker.cpp
+++ b/libsolidity/analysis/ContractLevelChecker.cpp
@@ -227,7 +227,7 @@ void ContractLevelChecker::checkAbstractFunctions(ContractDefinition const& _con
return _type->hasEqualParameterTypes(*_funAndFlag.first);
});
if (it == overloads.end())
- overloads.push_back(make_pair(_type, _implemented));
+ overloads.emplace_back(_type, _implemented);
else if (it->second)
{
if (!_implemented)
@@ -409,8 +409,8 @@ void ContractLevelChecker::checkExternalTypeClashes(ContractDefinition const& _c
auto functionType = make_shared<FunctionType>(*f);
// under non error circumstances this should be true
if (functionType->interfaceFunctionType())
- externalDeclarations[functionType->externalSignature()].push_back(
- make_pair(f, functionType->asCallableFunction(false))
+ externalDeclarations[functionType->externalSignature()].emplace_back(
+ f, functionType->asCallableFunction(false)
);
}
for (VariableDeclaration const* v: contract->stateVariables())
@@ -419,8 +419,8 @@ void ContractLevelChecker::checkExternalTypeClashes(ContractDefinition const& _c
auto functionType = make_shared<FunctionType>(*v);
// under non error circumstances this should be true
if (functionType->interfaceFunctionType())
- externalDeclarations[functionType->externalSignature()].push_back(
- make_pair(v, functionType->asCallableFunction(false))
+ externalDeclarations[functionType->externalSignature()].emplace_back(
+ v, functionType->asCallableFunction(false)
);
}
}