diff options
author | fonsinchen <fonsinchen@openttd.org> | 2013-11-07 20:50:03 +0000 |
---|---|---|
committer | fonsinchen <fonsinchen@openttd.org> | 2013-11-07 20:50:03 +0000 |
commit | f6fd21e8e668860086b41aec7a939bd7b027f162 (patch) | |
tree | 14e6e655c5df0e20f0d1f6a24d198e64e2f0685a /src/linkgraph/refresh.h | |
parent | fbceb10ff51e73fe8096a171c43cc98f20f56fc8 (diff) | |
download | openttd-f6fd21e8e668860086b41aec7a939bd7b027f162.tar.xz |
(svn r25948) -Fix [FS#5796]: Make sure LinkRefresher doesn't delete the LinkGraph DeleteStaleLinks() is examining.
Diffstat (limited to 'src/linkgraph/refresh.h')
-rw-r--r-- | src/linkgraph/refresh.h | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/src/linkgraph/refresh.h b/src/linkgraph/refresh.h index aa3d8850d..21c92c4bc 100644 --- a/src/linkgraph/refresh.h +++ b/src/linkgraph/refresh.h @@ -23,7 +23,7 @@ */ class LinkRefresher { public: - static void Run(Vehicle *v); + static void Run(Vehicle *v, bool allow_merge = true); protected: /** @@ -87,8 +87,9 @@ protected: 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. + bool allow_merge; ///< If the refresher is allowed to merge or extend link graphs. - LinkRefresher(Vehicle *v, HopSet *seen_hops); + LinkRefresher(Vehicle *v, HopSet *seen_hops, bool allow_merge); void HandleRefit(const Order *next); void ResetRefit(); |