summaryrefslogtreecommitdiff
path: root/src/command.h
diff options
context:
space:
mode:
authorpeter1138 <peter1138@openttd.org>2007-08-03 09:08:49 +0000
committerpeter1138 <peter1138@openttd.org>2007-08-03 09:08:49 +0000
commit616eb4134eac435bea86d738475f718309f7c5ea (patch)
treeb6337974657d183b3d4648de552643ab63470cc7 /src/command.h
parentd6c915e6a631b76bcb1459f2509a142298a2daf8 (diff)
downloadopenttd-616eb4134eac435bea86d738475f718309f7c5ea.tar.xz
(svn r10762) -Codechange: Change enum StringIDEnum { to static const StringID = for
each STR_ entry. This avoids the need for a cast to StringID in some places and thus better type-safety.
Diffstat (limited to 'src/command.h')
-rw-r--r--src/command.h4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/command.h b/src/command.h
index 809fdab0f..65fc0c495 100644
--- a/src/command.h
+++ b/src/command.h
@@ -195,9 +195,9 @@ struct Command {
static inline bool CmdFailed(CommandCost cost) { return cost.Failed(); }
static inline bool CmdSucceeded(CommandCost cost) { return cost.Succeeded(); }
-static const CommandCost CMD_ERROR = CommandCost((StringID)INVALID_STRING_ID);
+static const CommandCost CMD_ERROR = CommandCost(INVALID_STRING_ID);
-#define return_cmd_error(errcode) do { return CommandCost((StringID)(errcode)); } while (0)
+#define return_cmd_error(errcode) do { return CommandCost(errcode); } while (0)
/* command.cpp */
typedef void CommandCallback(bool success, TileIndex tile, uint32 p1, uint32 p2);