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 | 82e79b847e6c0c19010f0bf8f7bc462cdcd9ebc3 (patch) | |
tree | a267e10793edc2f19da1d23e3a7f536644234f0f /src/command.h | |
parent | 80d71953ba2bbf49157ec1208589e295bb900def (diff) | |
download | openttd-82e79b847e6c0c19010f0bf8f7bc462cdcd9ebc3.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); |