Merge pull request #6725 from AndreyBronin/develop

GCC 9.1 build fix. error: redundant move in return statement
This commit is contained in:
Daniel Kirchner 2019-05-15 11:37:20 +02:00 committed by GitHub
commit a10501bb7d
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
4 changed files with 9 additions and 9 deletions

View File

@ -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)

View File

@ -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&)

View File

@ -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
{

View File

@ -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);