(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.
This commit is contained in:
peter1138
2007-08-03 09:08:49 +00:00
parent d6c915e6a6
commit 616eb4134e
5 changed files with 13 additions and 10 deletions

View File

@@ -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);