summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorfonsinchen <fonsinchen@openttd.org>2013-10-22 19:25:29 +0000
committerfonsinchen <fonsinchen@openttd.org>2013-10-22 19:25:29 +0000
commit6c4e7ab51dbac9089644b2d7388092a6027c6223 (patch)
tree0648c0ee3deddf226def3ff8e4f2a7fa6caef7a9
parent8fc539251e2378d672782ca825e73e8e5d375fb4 (diff)
downloadopenttd-6c4e7ab51dbac9089644b2d7388092a6027c6223.tar.xz
(svn r25908) -Fix: Some documentation for constructors of LinkRefresher::Hop.
-rw-r--r--src/linkgraph/refresh.h12
1 files changed, 12 insertions, 0 deletions
diff --git a/src/linkgraph/refresh.h b/src/linkgraph/refresh.h
index ba96aa559..ff9662224 100644
--- a/src/linkgraph/refresh.h
+++ b/src/linkgraph/refresh.h
@@ -60,7 +60,19 @@ protected:
OrderID from; ///< Last order where vehicle could interact with cargo or absolute first order.
OrderID to; ///< Next order to be processed.
CargoID cargo; ///< Cargo the consist is probably carrying or CT_INVALID if unknown.
+
+ /**
+ * Default constructor should not be called but has to be visible for
+ * usage in std::set.
+ */
Hop() {NOT_REACHED();}
+
+ /**
+ * Real constructor, only use this one.
+ * @param from First order of the hop.
+ * @param to Second order of the hop.
+ * @param cargo Cargo the consist is probably carrying when passing the hop.
+ */
Hop(OrderID from, OrderID to, CargoID cargo) : from(from), to(to), cargo(cargo) {}
bool operator<(const Hop &other) const;
};