mirror of
https://github.com/JGRennison/OpenTTD-patches.git
synced 2024-11-16 00:12:51 +00:00
(svn r15349) -Codechange: no need to call a function when we know there is not going to be any change to the returned result
This commit is contained in:
parent
215bcb7d27
commit
ccaff36931
@ -41,7 +41,7 @@ static CommandCost DestroyCompanyHQ(CompanyID cid, uint32 flags)
|
||||
if (flags & DC_EXEC) {
|
||||
TileIndex t = c->location_of_HQ;
|
||||
|
||||
DoClearSquare(t + TileDiffXY(0, 0));
|
||||
DoClearSquare(t);
|
||||
DoClearSquare(t + TileDiffXY(0, 1));
|
||||
DoClearSquare(t + TileDiffXY(1, 0));
|
||||
DoClearSquare(t + TileDiffXY(1, 1));
|
||||
@ -68,7 +68,7 @@ void UpdateCompanyHQ(Company *c, uint score)
|
||||
|
||||
EnlargeCompanyHQ(tile, val);
|
||||
|
||||
MarkTileDirtyByTile(tile + TileDiffXY(0, 0));
|
||||
MarkTileDirtyByTile(tile);
|
||||
MarkTileDirtyByTile(tile + TileDiffXY(0, 1));
|
||||
MarkTileDirtyByTile(tile + TileDiffXY(1, 0));
|
||||
MarkTileDirtyByTile(tile + TileDiffXY(1, 1));
|
||||
|
Loading…
Reference in New Issue
Block a user