Codechange: make ExpensesType a scoped enum (#15572)

This commit is contained in:
Peter Nelson
2026-05-04 08:20:52 +01:00
committed by GitHub
parent cd597f79ad
commit 792f6d99a3
35 changed files with 200 additions and 189 deletions
+2 -2
View File
@@ -514,7 +514,7 @@ void GenerateTrees()
CommandCost CmdPlantTree(DoCommandFlags flags, TileIndex tile, TileIndex start_tile, uint8_t tree_to_plant, bool diagonal)
{
StringID msg = INVALID_STRING_ID;
CommandCost cost(EXPENSES_OTHER);
CommandCost cost(ExpensesType::Other);
if (start_tile >= Map::Size()) return CMD_ERROR;
/* Check the tree type within the current climate */
@@ -735,7 +735,7 @@ static CommandCost ClearTile_Trees(TileIndex tile, DoCommandFlags flags)
if (flags.Test(DoCommandFlag::Execute)) DoClearSquare(tile);
return CommandCost(EXPENSES_CONSTRUCTION, num * _price[Price::ClearTrees]);
return CommandCost(ExpensesType::Construction, num * _price[Price::ClearTrees]);
}
/** @copydoc GetTileDescProc */