From 00a398deac2a83b1b2df3fc6c602c1aba0c22d7e Mon Sep 17 00:00:00 2001 From: glx22 Date: Thu, 9 Jan 2025 18:39:40 +0100 Subject: [PATCH] Codefix: Use NUM_INDUSTRYTILES where it's intended --- src/industry_cmd.cpp | 2 +- src/industrytype.h | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/industry_cmd.cpp b/src/industry_cmd.cpp index 9d5d761639..9039c8c60f 100644 --- a/src/industry_cmd.cpp +++ b/src/industry_cmd.cpp @@ -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]; } diff --git a/src/industrytype.h b/src/industrytype.h index 15307bc615..5421a0bcb6 100644 --- a/src/industrytype.h +++ b/src/industrytype.h @@ -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 {