mirror of
https://github.com/OpenTTD/OpenTTD
synced 2026-01-18 09:52:44 +01:00
Codechange: Replace C-style casts to size_t with static_cast. (#12455)
* Codechange: Replace C-style casts to size_t with static_cast. This touches only simple value-type casts. * Codechange: Replace static_cast<size_t>(-1) with SIZE_MAX Co-authored-by: Rubidium <rubidium@openttd.org>
This commit is contained in:
@@ -1694,7 +1694,7 @@ static CommandCost CheckIfFarEnoughFromConflictingIndustry(TileIndex tile, int t
|
||||
|
||||
/* On a large map with many industries, it may be faster to check an area. */
|
||||
static const int dmax = 14;
|
||||
if (Industry::GetNumItems() > (size_t) (dmax * dmax * 2)) {
|
||||
if (Industry::GetNumItems() > static_cast<size_t>(dmax * dmax * 2)) {
|
||||
const Industry *i = nullptr;
|
||||
TileArea tile_area = TileArea(tile, 1, 1).Expand(dmax);
|
||||
for (TileIndex atile : tile_area) {
|
||||
|
||||
Reference in New Issue
Block a user