1
0
Fork 0

Codechange: No need to call DeleteAnimatedTile and DoClearSquare. (#13191)

DoClearSquare calls DeleteAnimatedTile itself so this is effectively a duplicate call.
pull/13192/head
Peter Nelson 2024-12-23 19:08:03 +00:00 committed by GitHub
parent 90a8d7a953
commit 1cf3a2a726
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 1 additions and 6 deletions

View File

@ -2196,8 +2196,6 @@ static CommandCost RemoveRoadStop(TileIndex tile, DoCommandFlag flags, int repla
Company::Get(st->owner)->infrastructure.station--;
DirtyCompanyInfrastructureWindows(st->owner);
DeleteAnimatedTile(tile);
uint specindex = GetCustomRoadStopSpecIndex(tile);
DeleteNewGRFInspectWindow(GSF_ROADSTOPS, tile.base());
@ -2205,6 +2203,7 @@ static CommandCost RemoveRoadStop(TileIndex tile, DoCommandFlag flags, int repla
if (IsDriveThroughStopTile(tile)) {
/* Clears the tile for us */
cur_stop->ClearDriveThrough();
DeleteAnimatedTile(tile);
} else {
DoClearSquare(tile);
}
@ -2279,8 +2278,6 @@ CommandCost RemoveRoadWaypointStop(TileIndex tile, DoCommandFlag flags, int repl
Company::Get(wp->owner)->infrastructure.station--;
DirtyCompanyInfrastructureWindows(wp->owner);
DeleteAnimatedTile(tile);
uint specindex = GetCustomRoadStopSpecIndex(tile);
DeleteNewGRFInspectWindow(GSF_ROADSTOPS, tile.base());
@ -2702,7 +2699,6 @@ static CommandCost RemoveAirport(TileIndex tile, DoCommandFlag flags)
cost.AddCost(_price[PR_CLEAR_STATION_AIRPORT]);
if (flags & DC_EXEC) {
DeleteAnimatedTile(tile_cur);
DoClearSquare(tile_cur);
DeleteNewGRFInspectWindow(GSF_AIRPORTTILES, tile_cur.base());
}

View File

@ -2936,7 +2936,6 @@ static void DoClearTownHouseHelper(TileIndex tile, Town *t, HouseID house)
assert(IsTileType(tile, MP_HOUSE));
DecreaseBuildingCount(t, house);
DoClearSquare(tile);
DeleteAnimatedTile(tile);
DeleteNewGRFInspectWindow(GSF_HOUSES, tile.base());
}