Changeset - r23682:d65b8fe9f89d
[Not reviewed]
master
0 2 0
Charles Pigott - 5 years ago 2019-04-22 21:57:37
charlespigott@googlemail.com
Codechange: Remove DistributionTypeByte
2 files changed with 5 insertions and 6 deletions:
0 comments (0 inline, 0 general)
src/linkgraph/linkgraph_type.h
Show inline comments
 
@@ -18,13 +18,13 @@ static const LinkGraphID INVALID_LINK_GR
 
typedef uint16 LinkGraphJobID;
 
static const LinkGraphID INVALID_LINK_GRAPH_JOB = UINT16_MAX;
 

	
 
typedef uint16 NodeID;
 
static const NodeID INVALID_NODE = UINT16_MAX;
 

	
 
enum DistributionType {
 
enum DistributionType : byte {
 
	DT_BEGIN = 0,
 
	DT_MIN = 0,
 
	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_MAX_NONSYMMETRIC = 1, ///< Maximum non-symmetric distribution.
 
	DT_SYMMETRIC = 2,        ///< Symmetric distribution. The same amount of cargo travels in each direction between each pair of nodes.
 
@@ -34,13 +34,12 @@ enum DistributionType {
 
};
 

	
 
/* It needs to be 8bits, because we save and load it as such
 
 * Define basic enum properties
 
 */
 
template <> struct EnumPropsT<DistributionType> : MakeEnumPropsT<DistributionType, byte, DT_BEGIN, DT_END, DT_NUM> {};
 
typedef TinyEnumT<DistributionType> DistributionTypeByte; // typedefing-enumification of DistributionType
 

	
 
/**
 
 * Special modes for updating links. 'Restricted' means that vehicles with
 
 * 'no loading' orders are serving the link. If a link is only served by
 
 * such vehicles it's 'fully restricted'. This means the link can be used
 
 * by cargo arriving in such vehicles, but not by cargo generated or
src/settings_type.h
Show inline comments
 
@@ -492,16 +492,16 @@ struct EconomySettings {
 
	bool   infrastructure_maintenance;       ///< enable monthly maintenance fee for owner infrastructure
 
};
 

	
 
struct LinkGraphSettings {
 
	uint16 recalc_time;                         ///< time (in days) for recalculating each link graph component.
 
	uint16 recalc_interval;                     ///< time (in days) between subsequent checks for link graphs to be calculated.
 
	DistributionTypeByte distribution_pax;      ///< distribution type for passengers
 
	DistributionTypeByte distribution_mail;     ///< distribution type for mail
 
	DistributionTypeByte distribution_armoured; ///< distribution type for armoured cargo class
 
	DistributionTypeByte distribution_default;  ///< distribution type for all other goods
 
	DistributionType distribution_pax;      ///< distribution type for passengers
 
	DistributionType distribution_mail;     ///< distribution type for mail
 
	DistributionType distribution_armoured; ///< distribution type for armoured cargo class
 
	DistributionType distribution_default;  ///< distribution type for all other goods
 
	uint8 accuracy;                             ///< accuracy when calculating things on the link graph. low accuracy => low running time
 
	uint8 demand_size;                          ///< influence of supply ("station size") on the demand function
 
	uint8 demand_distance;                      ///< influence of distance between stations on the demand function
 
	uint8 short_path_saturation;                ///< percentage up to which short paths are saturated before saturating most capacious paths
 

	
 
	inline DistributionType GetDistributionType(CargoID cargo) const {
0 comments (0 inline, 0 general)