diff --git a/src/command.cpp b/src/command.cpp --- a/src/command.cpp +++ b/src/command.cpp @@ -687,7 +687,7 @@ CommandCost DoCommandPInternal(TileIndex * Also takes a possible error message when it is set. * @param ret The command to add the cost of. */ -void CommandCost::AddCost(CommandCost ret) +void CommandCost::AddCost(const CommandCost &ret) { this->AddCost(ret.cost); if (this->success && !ret.success) {