diff options
author | fonsinchen <fonsinchen@openttd.org> | 2016-07-10 12:17:00 +0000 |
---|---|---|
committer | fonsinchen <fonsinchen@openttd.org> | 2016-07-10 12:17:00 +0000 |
commit | f769305d7d102d022f9a5139336a52c34ca24103 (patch) | |
tree | 59c7ee1662ec7384ce5d603b9689f82ea179dc5b /src/linkgraph/refresh.h | |
parent | 022b284064d4ddeb7c2faeda98f791d47dab4353 (diff) | |
download | openttd-f769305d7d102d022f9a5139336a52c34ca24103.tar.xz |
(svn r27614) -Codechange: Use a fixed array instead of a map for link refresher cargo capacities. (JGR)
Diffstat (limited to 'src/linkgraph/refresh.h')
-rw-r--r-- | src/linkgraph/refresh.h | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/src/linkgraph/refresh.h b/src/linkgraph/refresh.h index 6687b8a3b..42067ebcf 100644 --- a/src/linkgraph/refresh.h +++ b/src/linkgraph/refresh.h @@ -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. |