summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorrubidium <rubidium@openttd.org>2008-03-28 16:31:26 +0000
committerrubidium <rubidium@openttd.org>2008-03-28 16:31:26 +0000
commit450d234745250712b90a8ce91a8fb43673cb9204 (patch)
tree4a23c83aa3afc6b2350b16b9e3d191316c6ebfb4
parentcb96caa3d234e461fb3cf9ff9a5520a3318b94f9 (diff)
downloadopenttd-450d234745250712b90a8ce91a8fb43673cb9204.tar.xz
(svn r12466) -Codechange: move DestinationID to a more logical location.
-rw-r--r--src/openttd.h8
-rw-r--r--src/order.h2
-rw-r--r--src/order_cmd.cpp7
3 files changed, 9 insertions, 8 deletions
diff --git a/src/openttd.h b/src/openttd.h
index ac3d94698..196851234 100644
--- a/src/openttd.h
+++ b/src/openttd.h
@@ -32,14 +32,6 @@ typedef uint16 OrderID;
typedef uint16 SignID;
typedef uint16 GroupID;
typedef uint16 EngineRenewID;
-typedef uint16 DestinationID;
-
-/* DestinationID must be at least as large as every these below, because it can
- * be any of them
- */
-assert_compile(sizeof(DestinationID) >= sizeof(DepotID));
-assert_compile(sizeof(DestinationID) >= sizeof(WaypointID));
-assert_compile(sizeof(DestinationID) >= sizeof(StationID));
enum GameModes {
GM_MENU,
diff --git a/src/order.h b/src/order.h
index d1442e605..952cfa760 100644
--- a/src/order.h
+++ b/src/order.h
@@ -12,6 +12,8 @@
#include "tile_type.h"
#include "date_type.h"
+typedef uint16 DestinationID;
+
enum {
INVALID_VEH_ORDER_ID = 0xFF,
};
diff --git a/src/order_cmd.cpp b/src/order_cmd.cpp
index b968a2852..044494404 100644
--- a/src/order_cmd.cpp
+++ b/src/order_cmd.cpp
@@ -25,6 +25,13 @@
#include "table/strings.h"
+/* DestinationID must be at least as large as every these below, because it can
+ * be any of them
+ */
+assert_compile(sizeof(DestinationID) >= sizeof(DepotID));
+assert_compile(sizeof(DestinationID) >= sizeof(WaypointID));
+assert_compile(sizeof(DestinationID) >= sizeof(StationID));
+
TileIndex _backup_orders_tile;
BackuppedOrders _backup_orders_data;