mirror of
https://github.com/OpenTTD/OpenTTD
synced 2026-01-23 04:04:09 +01:00
Codechange: (re)set multiple bitset flags in one call. (#14017)
This commit is contained in:
@@ -139,7 +139,7 @@ std::tuple<CommandCost, VehicleID, uint, uint16_t, CargoArray> CmdBuildVehicle(D
|
||||
/* If we are refitting we need to temporarily purchase the vehicle to be able to
|
||||
* test it. */
|
||||
DoCommandFlags subflags = flags;
|
||||
if (refitting && !flags.Test(DoCommandFlag::Execute)) subflags.Set(DoCommandFlag::Execute).Set(DoCommandFlag::AutoReplace);
|
||||
if (refitting && !flags.Test(DoCommandFlag::Execute)) subflags.Set({DoCommandFlag::Execute, DoCommandFlag::AutoReplace});
|
||||
|
||||
/* Vehicle construction needs random bits, so we have to save the random
|
||||
* seeds to prevent desyncs. */
|
||||
|
||||
Reference in New Issue
Block a user