Use move semantics on StackToDeepError

This commit is contained in:
Alex Beregszaszi 2019-03-26 15:56:04 +00:00
parent d8c42a0270
commit c26ffa737e

View File

@ -536,7 +536,7 @@ void CodeTransform::operator()(FunctionDefinition const& _function)
StackTooDeepError error(_error);
if (error.functionName.empty())
error.functionName = _function.name;
stackError(error, height);
stackError(std::move(error), height);
}
{
@ -566,7 +566,7 @@ void CodeTransform::operator()(FunctionDefinition const& _function)
to_string(stackLayout.size() - 17) +
" parameters or return variables too many to fit the stack size."
);
stackError(error, m_assembly.stackHeight() - _function.parameters.size());
stackError(std::move(error), m_assembly.stackHeight() - _function.parameters.size());
}
else
{