Fix various narrowing cast warnings
This commit is contained in:
@@ -1281,8 +1281,8 @@ CommandCost CanExpandRailStation(const BaseStation *st, TileArea &new_ta)
|
||||
/* determine new size of train station region.. */
|
||||
int x = std::min(TileX(cur_ta.tile), TileX(new_ta.tile));
|
||||
int y = std::min(TileY(cur_ta.tile), TileY(new_ta.tile));
|
||||
new_ta.w = std::max(TileX(cur_ta.tile) + cur_ta.w, TileX(new_ta.tile) + new_ta.w) - x;
|
||||
new_ta.h = std::max(TileY(cur_ta.tile) + cur_ta.h, TileY(new_ta.tile) + new_ta.h) - y;
|
||||
new_ta.w = (uint16_t)std::max(TileX(cur_ta.tile) + cur_ta.w, TileX(new_ta.tile) + new_ta.w) - x;
|
||||
new_ta.h = (uint16_t)std::max(TileY(cur_ta.tile) + cur_ta.h, TileY(new_ta.tile) + new_ta.h) - y;
|
||||
new_ta.tile = TileXY(x, y);
|
||||
|
||||
/* make sure the final size is not too big. */
|
||||
|
Reference in New Issue
Block a user