mirror of
https://github.com/OpenTTD/OpenTTD
synced 2026-01-16 00:42:45 +01:00
This commit is contained in:
@@ -398,11 +398,12 @@ CommandCost CommandHelperBase::InternalExecuteProcessResult(Commands cmd, Comman
|
||||
* Also takes a possible error message when it is set.
|
||||
* @param ret The command to add the cost of.
|
||||
*/
|
||||
void CommandCost::AddCost(const CommandCost &ret)
|
||||
void CommandCost::AddCost(CommandCost &&ret)
|
||||
{
|
||||
this->AddCost(ret.cost);
|
||||
if (this->success && !ret.success) {
|
||||
this->message = ret.message;
|
||||
this->encoded_message = std::move(ret.encoded_message);
|
||||
this->success = false;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user