Codechange: use TileDiffXY(0, 0) over magic 0

This commit is contained in:
Rubidium 2024-10-18 16:11:41 +02:00 committed by rubidium42
parent 3b0fcf442f
commit a6b7593a52
2 changed files with 2 additions and 2 deletions

View File

@ -44,7 +44,7 @@ void RebuildTownCaches()
if (IsHouseCompleted(t)) town->cache.population += HouseSpec::Get(house_id)->population;
/* Increase the number of houses for every house, but only once. */
if (GetHouseNorthPart(house_id) == 0) town->cache.num_houses++;
if (GetHouseNorthPart(house_id) == TileDiffXY(0, 0)) town->cache.num_houses++;
}
/* Update the population and num_house dependent values */

View File

@ -2934,7 +2934,7 @@ TileIndexDiff GetHouseNorthPart(HouseID &house)
return TileDiffXY(-1, -1);
}
}
return 0;
return TileDiffXY(0, 0);
}
/**