Codechange: initialise instance members
This commit is contained in:
@@ -21,17 +21,17 @@
|
||||
* Only the cargo type of the most saturated linkgraph is taken into account.
|
||||
*/
|
||||
struct LinkProperties {
|
||||
LinkProperties() : cargo(INVALID_CARGO), capacity(0), usage(0), planned(0), shared(false) {}
|
||||
LinkProperties() {}
|
||||
|
||||
/** Return the usage of the link to display. */
|
||||
uint Usage() const { return std::max(this->usage, this->planned); }
|
||||
|
||||
CargoType cargo; ///< Cargo type of the link.
|
||||
uint capacity; ///< Capacity of the link.
|
||||
uint usage; ///< Actual usage of the link.
|
||||
uint planned; ///< Planned usage of the link.
|
||||
uint32_t time; ///< Travel time of the link.
|
||||
bool shared; ///< If this is a shared link to be drawn dashed.
|
||||
CargoType cargo = INVALID_CARGO; ///< Cargo type of the link.
|
||||
uint capacity = 0; ///< Capacity of the link.
|
||||
uint usage = 0; ///< Actual usage of the link.
|
||||
uint planned = 0; ///< Planned usage of the link.
|
||||
uint32_t time = 0; ///< Travel time of the link.
|
||||
bool shared = false; ///< If this is a shared link to be drawn dashed.
|
||||
};
|
||||
|
||||
/**
|
||||
|
||||
@@ -52,7 +52,7 @@ public:
|
||||
* can only decrease or stay the same if you add more edges.
|
||||
*/
|
||||
class CapacityAnnotation : public Path {
|
||||
int cached_annotation;
|
||||
int cached_annotation = 0;
|
||||
|
||||
public:
|
||||
|
||||
|
||||
Reference in New Issue
Block a user