mirror of
https://github.com/ethereum/solidity
synced 2023-10-03 13:03:40 +00:00
Apply modernize-use-emplace.
This commit is contained in:
@@ -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")
|
||||
}
|
||||
);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user