diff options
author | rubidium <rubidium@openttd.org> | 2007-06-18 16:42:40 +0000 |
---|---|---|
committer | rubidium <rubidium@openttd.org> | 2007-06-18 16:42:40 +0000 |
commit | b09431478d416ceb58f9676d67c1cc3b4af397bc (patch) | |
tree | a267e10793edc2f19da1d23e3a7f536644234f0f /src/command.h | |
parent | fad2a36b8f9ce57610532226b2f14cbadc40fae9 (diff) | |
download | openttd-b09431478d416ceb58f9676d67c1cc3b4af397bc.tar.xz |
(svn r10200) -Codechange: add "shortcut" for !CmdFailed (CmdSucceeded).
Diffstat (limited to 'src/command.h')
-rw-r--r-- | src/command.h | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/src/command.h b/src/command.h index 428dd32d6..177663e0b 100644 --- a/src/command.h +++ b/src/command.h @@ -205,6 +205,8 @@ static inline bool CmdFailed(CommandCost res) return res <= (CMD_ERROR | INVALID_STRING_ID); } +static inline bool CmdSucceeded(CommandCost res) { return !CmdFailed(res); } + /* command.cpp */ typedef void CommandCallback(bool success, TileIndex tile, uint32 p1, uint32 p2); CommandCost DoCommand(TileIndex tile, uint32 p1, uint32 p2, uint32 flags, uint procc); |