(svn r16327) -Codechange: replace IsValidPoolItemID(index) by PoolItem::IsValidID(index)

This commit is contained in:
smatz
2009-05-17 01:00:56 +00:00
parent cf986c3099
commit 0c10daa243
78 changed files with 242 additions and 303 deletions

View File

@@ -388,7 +388,7 @@ CommandCost CmdPlantTree(TileIndex tile, DoCommandFlag flags, uint32 p1, uint32
}
}
if (_game_mode != GM_EDITOR && IsValidCompanyID(_current_company)) {
if (_game_mode != GM_EDITOR && Company::IsValidID(_current_company)) {
Town *t = ClosestTownFromTile(tile, _settings_game.economy.dist_local_authority);
if (t != NULL) ChangeTownRating(t, RATING_TREE_UP_STEP, RATING_TREE_MAXIMUM, flags);
}
@@ -531,7 +531,7 @@ static CommandCost ClearTile_Trees(TileIndex tile, DoCommandFlag flags)
{
uint num;
if (IsValidCompanyID(_current_company)) {
if (Company::IsValidID(_current_company)) {
Town *t = ClosestTownFromTile(tile, _settings_game.economy.dist_local_authority);
if (t != NULL) ChangeTownRating(t, RATING_TREE_DOWN_STEP, RATING_TREE_MINIMUM, flags);
}