1
0
mirror of https://github.com/OpenTTD/OpenTTD synced 2026-01-16 08:52:40 +01:00

Codechange: (re)set multiple bitset flags in one call. (#14017)

This commit is contained in:
Peter Nelson
2025-04-18 14:07:57 +01:00
committed by GitHub
parent 31e716449d
commit 2c59838acb
10 changed files with 11 additions and 12 deletions

View File

@@ -240,7 +240,7 @@ CommandCost CmdBuildObject(DoCommandFlags flags, TileIndex tile, ObjectType type
if (!IsWaterTile(t)) {
/* Normal water tiles don't have to be cleared. For all other tile types clear
* the tile but leave the water. */
cost.AddCost(Command<CMD_LANDSCAPE_CLEAR>::Do(DoCommandFlags{flags}.Reset(DoCommandFlag::NoWater).Reset(DoCommandFlag::Execute), t));
cost.AddCost(Command<CMD_LANDSCAPE_CLEAR>::Do(DoCommandFlags{flags}.Reset({DoCommandFlag::NoWater, DoCommandFlag::Execute}), t));
} else {
/* Can't build on water owned by another company. */
Owner o = GetTileOwner(t);