Make use of make_vector where possible.

This commit is contained in:
Daniel Kirchner
2019-05-17 10:08:53 +02:00
parent 2046e61c26
commit 05c210772a
3 changed files with 40 additions and 54 deletions
+3 -5
View File
@@ -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 {{}};
}
}