src/command.h
changeset 7442 a4f7989f27d4
parent 7439 0c0e2945c890
child 7446 1c4d469f986e
--- a/src/command.h	Mon Jun 18 14:40:07 2007 +0000
+++ b/src/command.h	Mon Jun 18 16:42:40 2007 +0000
@@ -205,6 +205,8 @@
 	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);