Cleanup: Remove questionable syntax in HQ size calculation

This commit is contained in:
Johannes E. Krause
2019-03-12 14:55:56 +01:00
committed by PeterN
parent ba3d7122df
commit 234f1007f7

View File

@@ -158,12 +158,11 @@ void UpdateCompanyHQ(TileIndex tile, uint score)
{ {
if (tile == INVALID_TILE) return; if (tile == INVALID_TILE) return;
byte val; byte val = 0;
(val = 0, score < 170) || if (score >= 170) val++;
(val++, score < 350) || if (score >= 350) val++;
(val++, score < 520) || if (score >= 520) val++;
(val++, score < 720) || if (score >= 720) val++;
(val++, true);
while (GetCompanyHQSize(tile) < val) { while (GetCompanyHQSize(tile) < val) {
IncreaseCompanyHQSize(tile); IncreaseCompanyHQSize(tile);