mirror of
https://github.com/ethereum/solidity
synced 2023-10-03 13:03:40 +00:00
Make use of make_vector where possible.
This commit is contained in:
@@ -51,12 +51,10 @@ OptionalStatements replaceConstArgSwitch(Switch& _switchStmt, u256 const& _const
|
||||
if (!matchingCaseBlock && defaultCase)
|
||||
matchingCaseBlock = &defaultCase->body;
|
||||
|
||||
OptionalStatements s = vector<Statement>{};
|
||||
|
||||
if (matchingCaseBlock)
|
||||
s->emplace_back(std::move(*matchingCaseBlock));
|
||||
|
||||
return s;
|
||||
return make_vector<Statement>(std::move(*matchingCaseBlock));
|
||||
else
|
||||
return {{}};
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user