Apply modernize-use-emplace.

This commit is contained in:
Alexander Arlt
2020-04-02 17:35:48 -05:00
parent 82f57f0465
commit 90bb1d8a7c
14 changed files with 33 additions and 49 deletions
+2 -6
View File
@@ -32,8 +32,7 @@ void ConstructorKeyword::endVisit(ContractDefinition const& _contract)
{
for (auto const* function: _contract.definedFunctions())
if (function->name() == _contract.name())
m_changes.push_back(
UpgradeChange{
m_changes.emplace_back(
UpgradeChange::Level::Safe,
function->location(),
SourceTransform::replaceFunctionName(
@@ -41,18 +40,15 @@ void ConstructorKeyword::endVisit(ContractDefinition const& _contract)
function->name(),
"constructor"
)
}
);
}
void VisibilitySpecifier::endVisit(FunctionDefinition const& _function)
{
if (_function.noVisibilitySpecified())
m_changes.push_back(
UpgradeChange{
m_changes.emplace_back(
UpgradeChange::Level::Safe,
_function.location(),
SourceTransform::insertAfterRightParenthesis(_function.location(), "public")
}
);
}