Codefix: cargo_(dis)allowed for default refit masks are cargo classes, not CargoTypes. (#12884)

Use an alias for CargoClasses to avoid ambiguity.
This commit is contained in:
Peter Nelson
2024-07-29 20:58:53 +01:00
committed by GitHub
parent bec37ee704
commit 3176de3f1d
2 changed files with 9 additions and 6 deletions

View File

@@ -318,8 +318,8 @@ struct GRFTempEngineData {
NONEMPTY, ///< GRF defined the vehicle as refittable. If the refitmask is empty after translation (cargotypes not available), disable the vehicle.
};
uint16_t cargo_allowed;
uint16_t cargo_disallowed;
CargoClasses cargo_allowed;
CargoClasses cargo_disallowed;
RailTypeLabel railtypelabel;
uint8_t roadtramtype;
const GRFFile *defaultcargo_grf; ///< GRF defining the cargo translation table to use if the default cargo is the 'first refittable'.
@@ -9001,8 +9001,8 @@ static void CalculateRefitMasks()
static const struct DefaultRefitMasks {
uint8_t climate;
CargoLabel cargo_label;
CargoTypes cargo_allowed;
CargoTypes cargo_disallowed;
CargoClasses cargo_allowed;
CargoClasses cargo_disallowed;
} _default_refit_masks[] = {
{T | A | S | Y, CT_PASSENGERS, CC_PASSENGERS, 0},
{T | A | S , CT_MAIL, CC_MAIL, 0},