mirror of
https://github.com/ethereum/solidity
synced 2023-10-03 13:03:40 +00:00
Merge pull request #6725 from AndreyBronin/develop
GCC 9.1 build fix. error: redundant move in return statement
This commit is contained in:
commit
a10501bb7d
@ -437,7 +437,7 @@ boost::variant<OptimiserSettings, Json::Value> parseOptimizerSettings(Json::Valu
|
||||
return *error;
|
||||
}
|
||||
}
|
||||
return std::move(settings);
|
||||
return { std::move(settings) };
|
||||
}
|
||||
|
||||
}
|
||||
@ -663,7 +663,7 @@ boost::variant<StandardCompiler::InputsAndSettings, Json::Value> StandardCompile
|
||||
|
||||
ret.outputSelection = std::move(outputSelection);
|
||||
|
||||
return std::move(ret);
|
||||
return { std::move(ret) };
|
||||
}
|
||||
|
||||
Json::Value StandardCompiler::compileSolidity(StandardCompiler::InputsAndSettings _inputsAndSettings)
|
||||
|
@ -63,7 +63,7 @@ wasm::Expression EWasmCodeTransform::generateMultiAssignment(
|
||||
wasm::LocalAssignment assignment{move(_variableNames.front()), std::move(_firstValue)};
|
||||
|
||||
if (_variableNames.size() == 1)
|
||||
return move(assignment);
|
||||
return { std::move(assignment) };
|
||||
|
||||
wasm::Block block;
|
||||
block.statements.emplace_back(move(assignment));
|
||||
@ -72,7 +72,7 @@ wasm::Expression EWasmCodeTransform::generateMultiAssignment(
|
||||
move(_variableNames.at(i)),
|
||||
make_unique<wasm::Expression>(wasm::GlobalVariable{m_globalVariables.at(i - 1).variableName})
|
||||
});
|
||||
return move(block);
|
||||
return { std::move(block) };
|
||||
}
|
||||
|
||||
wasm::Expression EWasmCodeTransform::operator()(VariableDeclaration const& _varDecl)
|
||||
@ -192,7 +192,7 @@ wasm::Expression EWasmCodeTransform::operator()(Switch const& _switch)
|
||||
*currentBlock += visit(c.body.statements);
|
||||
}
|
||||
}
|
||||
return move(block);
|
||||
return { std::move(block) };
|
||||
}
|
||||
|
||||
wasm::Expression EWasmCodeTransform::operator()(FunctionDefinition const&)
|
||||
@ -224,7 +224,7 @@ wasm::Expression EWasmCodeTransform::operator()(ForLoop const& _for)
|
||||
|
||||
wasm::Block breakBlock{breakLabel, {}};
|
||||
breakBlock.statements.emplace_back(move(loop));
|
||||
return move(breakBlock);
|
||||
return { std::move(breakBlock) };
|
||||
}
|
||||
|
||||
wasm::Expression EWasmCodeTransform::operator()(Break const&)
|
||||
|
@ -38,7 +38,7 @@ void ForLoopInitRewriter::operator()(Block& _block)
|
||||
vector<Statement> rewrite;
|
||||
swap(rewrite, forLoop.pre.statements);
|
||||
rewrite.emplace_back(move(forLoop));
|
||||
return std::move(rewrite);
|
||||
return { std::move(rewrite) };
|
||||
}
|
||||
else
|
||||
{
|
||||
|
@ -106,7 +106,7 @@ void SSATransform::operator()(Block& _block)
|
||||
});
|
||||
}
|
||||
boost::get<VariableDeclaration>(statements.front()).variables = std::move(newVariables);
|
||||
return std::move(statements);
|
||||
return { std::move(statements) };
|
||||
}
|
||||
else if (_s.type() == typeid(Assignment))
|
||||
{
|
||||
@ -133,7 +133,7 @@ void SSATransform::operator()(Block& _block)
|
||||
});
|
||||
}
|
||||
boost::get<VariableDeclaration>(statements.front()).variables = std::move(newVariables);
|
||||
return std::move(statements);
|
||||
return { std::move(statements) };
|
||||
}
|
||||
else
|
||||
visit(_s);
|
||||
|
Loading…
Reference in New Issue
Block a user