(svn r27614) -Codechange: Use a fixed array instead of a map for link refresher cargo capacities. (JGR)

This commit is contained in:
fonsinchen
2016-07-10 12:17:00 +00:00
parent a81b7a24a6
commit ff96590312
2 changed files with 13 additions and 9 deletions

View File

@@ -80,11 +80,10 @@ protected:
};
typedef std::vector<RefitDesc> RefitList;
typedef std::map<CargoID, uint> CapacitiesMap;
typedef std::set<Hop> HopSet;
Vehicle *vehicle; ///< Vehicle for which the links should be refreshed.
CapacitiesMap capacities; ///< Current added capacities per cargo ID in the consist.
uint capacities[NUM_CARGO]; ///< Current added capacities per cargo ID in the consist.
RefitList refit_capacities; ///< Current state of capacity remaining from previous refits versus overall capacity per vehicle in the consist.
HopSet *seen_hops; ///< Hops already seen. If the same hop is seen twice we stop the algorithm. This is shared between all Refreshers of the same run.
CargoID cargo; ///< Cargo given in last refit order.