Remove various uses of lengthof on std::array

This commit is contained in:
Jonathan G Rennison
2024-04-08 19:55:58 +01:00
parent 919830db7a
commit 28e74005d0
15 changed files with 77 additions and 77 deletions

View File

@@ -113,7 +113,7 @@ void ResetHouseClassIDs()
HouseClassID AllocateHouseClassID(byte grf_class_id, uint32_t grfid)
{
/* Start from 1 because 0 means that no class has been assigned. */
for (int i = 1; i != lengthof(_class_mapping); i++) {
for (size_t i = 1; i != std::size(_class_mapping); i++) {
HouseClassMapping *map = &_class_mapping[i];
if (map->class_id == grf_class_id && map->grfid == grfid) return (HouseClassID)i;