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

@@ -19,7 +19,7 @@ static const LinkGraphJobID INVALID_LINK_GRAPH_JOB = UINT16_MAX;
typedef uint16_t NodeID;
static const NodeID INVALID_NODE = UINT16_MAX;
enum DistributionType : byte {
enum DistributionType : uint8_t {
DT_MANUAL = 0, ///< Manual distribution. No link graph calculations are run.
DT_ASYMMETRIC = 1, ///< Asymmetric distribution. Usually cargo will only travel in one direction.
DT_SYMMETRIC = 2, ///< Symmetric distribution. The same amount of cargo travels in each direction between each pair of nodes.

View File

@@ -109,7 +109,7 @@ bool LinkRefresher::HandleRefit(CargoID refit_cargo)
/* Back up the vehicle's cargo type */
CargoID temp_cid = v->cargo_type;
byte temp_subtype = v->cargo_subtype;
uint8_t temp_subtype = v->cargo_subtype;
v->cargo_type = this->cargo;
if (e->refit_capacity_values == nullptr || !(e->callbacks_used & SGCU_REFIT_CB_ALL_CARGOES) || this->cargo == e->GetDefaultCargoType() || (e->type == VEH_AIRCRAFT && IsCargoInClass(this->cargo, CC_PASSENGERS))) {
/* This can be omitted when the refit capacity values are already determined, and the capacity is definitely from the refit callback */