Codechange: Suppress warnings when asserts are disabled (#8917)

This commit is contained in:
Patric Stout
2021-04-01 11:16:19 +02:00
committed by GitHub
parent 9eb6c78a02
commit fece1c57ca
14 changed files with 31 additions and 7 deletions

View File

@@ -597,6 +597,7 @@ static CommandCost ReplaceChain(Vehicle **chain, DoCommandFlag flags, bool wagon
/* Sell wagon */
CommandCost ret = DoCommand(0, wagon->index, 0, DC_EXEC, GetCmdSellVeh(wagon));
(void)ret; // assert only
assert(ret.Succeeded());
new_vehs[i] = nullptr;
@@ -652,6 +653,7 @@ static CommandCost ReplaceChain(Vehicle **chain, DoCommandFlag flags, bool wagon
for (int i = num_units - 1; i > 0; i--) {
CommandCost ret = CmdMoveVehicle(old_vehs[i], old_head, DC_EXEC | DC_AUTOREPLACE, false);
(void)ret; // assert only
assert(ret.Succeeded());
}
}