Merge branch 'master' into jgrpp

Remove 'byte' typedef
This commit is contained in:
Jonathan G Rennison
2024-05-07 17:21:50 +01:00
376 changed files with 2220 additions and 2152 deletions

View File

@@ -142,7 +142,7 @@ Money CalculateCompanyValueExcludingShares(const Company *c, bool including_loan
uint num = 0;
for (const Station *st : Station::Iterate()) {
if (st->owner == owner) num += CountBits((byte)st->facilities);
if (st->owner == owner) num += CountBits((uint8_t)st->facilities);
}
Money value = num * _price[PR_STATION_VALUE] * 25;
@@ -264,7 +264,7 @@ int UpdateCompanyRatingAndValue(Company *c, bool update)
uint num = 0;
for (const Station *st : Station::Iterate()) {
/* Only count stations that are actually serviced */
if (st->owner == owner && (st->time_since_load <= 20 || st->time_since_unload <= 20)) num += CountBits((byte)st->facilities);
if (st->owner == owner && (st->time_since_load <= 20 || st->time_since_unload <= 20)) num += CountBits((uint8_t)st->facilities);
}
_score_part[owner][SCORE_STATIONS] = num;
}