summaryrefslogtreecommitdiff
path: root/src/command_type.h
diff options
context:
space:
mode:
authorrubidium <rubidium@openttd.org>2011-11-14 20:38:56 +0000
committerrubidium <rubidium@openttd.org>2011-11-14 20:38:56 +0000
commitf60042942473640e60136e7a43d2bc6a4c824a26 (patch)
treef338a814fbf9e1312236b184e07833babf0f8a27 /src/command_type.h
parent15f671279df2696aad13aca3d431ee4a988694f3 (diff)
downloadopenttd-f60042942473640e60136e7a43d2bc6a4c824a26.tar.xz
(svn r23215) -Codechange: stricter type safety for CommandFlags
Diffstat (limited to 'src/command_type.h')
-rw-r--r--src/command_type.h9
1 files changed, 5 insertions, 4 deletions
diff --git a/src/command_type.h b/src/command_type.h
index 606bfc287..f085edf07 100644
--- a/src/command_type.h
+++ b/src/command_type.h
@@ -355,6 +355,7 @@ enum CommandFlags {
CMD_NO_WATER = 0x40, ///< set the DC_NO_WATER flag on this command
CMD_CLIENT_ID = 0x80, ///< set p2 with the ClientID of the sending client.
};
+DECLARE_ENUM_AS_BIT_SET(CommandFlags)
/** Types of commands we have. */
enum CommandType {
@@ -406,10 +407,10 @@ typedef CommandCost CommandProc(TileIndex tile, DoCommandFlag flags, uint32 p1,
* the #CMD_AUTO, #CMD_OFFLINE and #CMD_SERVER values.
*/
struct Command {
- CommandProc *proc; ///< The procedure to actually executing
- const char *name; ///< A human readable name for the procedure
- byte flags; ///< The (command) flags to that apply to this command
- CommandType type; ///< The type of command.
+ CommandProc *proc; ///< The procedure to actually executing
+ const char *name; ///< A human readable name for the procedure
+ CommandFlags flags; ///< The (command) flags to that apply to this command
+ CommandType type; ///< The type of command.
};
/**