mirror of
https://github.com/ethereum/solidity
synced 2023-10-03 13:03:40 +00:00
Make use of C++17 std::optional<> instead of boost::optional<>.
This commit is contained in:
@@ -147,14 +147,14 @@ bool FullInliner::recursive(FunctionDefinition const& _fun) const
|
||||
|
||||
void InlineModifier::operator()(Block& _block)
|
||||
{
|
||||
function<boost::optional<vector<Statement>>(Statement&)> f = [&](Statement& _statement) -> boost::optional<vector<Statement>> {
|
||||
function<std::optional<vector<Statement>>(Statement&)> f = [&](Statement& _statement) -> std::optional<vector<Statement>> {
|
||||
visit(_statement);
|
||||
return tryInlineStatement(_statement);
|
||||
};
|
||||
iterateReplacing(_block.statements, f);
|
||||
}
|
||||
|
||||
boost::optional<vector<Statement>> InlineModifier::tryInlineStatement(Statement& _statement)
|
||||
std::optional<vector<Statement>> InlineModifier::tryInlineStatement(Statement& _statement)
|
||||
{
|
||||
// Only inline for expression statements, assignments and variable declarations.
|
||||
Expression* e = boost::apply_visitor(GenericFallbackReturnsVisitor<Expression*, ExpressionStatement, Assignment, VariableDeclaration>(
|
||||
|
||||
Reference in New Issue
Block a user