1
0
Fork 0

Codefix: Use NUM_INDUSTRYTILES where it's intended

pull/13300/head
glx22 2025-01-09 18:39:40 +01:00
parent ae3df83e82
commit 00a398deac
2 changed files with 2 additions and 2 deletions

View File

@ -136,7 +136,7 @@ const IndustrySpec *GetIndustrySpec(IndustryType thistype)
*/
const IndustryTileSpec *GetIndustryTileSpec(IndustryGfx gfx)
{
assert(gfx < INVALID_INDUSTRYTILE);
assert(gfx < NUM_INDUSTRYTILES);
return &_industry_tile_specs[gfx];
}

View File

@ -194,7 +194,7 @@ inline IndustryGfx GetTranslatedIndustryTileID(IndustryGfx gfx)
* will never be assigned as a tile index and is only required in order to do some
* tests while building the industry (as in WATER REQUIRED */
if (gfx != 0xFF) {
assert(gfx < INVALID_INDUSTRYTILE);
assert(gfx < NUM_INDUSTRYTILES);
const IndustryTileSpec *it = &_industry_tile_specs[gfx];
return it->grf_prop.override == INVALID_INDUSTRYTILE ? gfx : it->grf_prop.override;
} else {