(svn r3282) - Codechange: Replace tests against CMD_ERROR with CmdFailed()

This commit is contained in:
2005-12-10 12:05:39 +00:00
parent 6a6e145010
commit 809b03c81a
11 changed files with 35 additions and 36 deletions

View File

@@ -130,7 +130,7 @@ void ShowBuildBridgeWindow(TileIndex start, TileIndex end, byte bridge_type)
// returns CMD_ERROR on failure, and price on success
ret = DoCommandByTile(end, start, (bridge_type << 8), DC_AUTO | DC_QUERY_COST, CMD_BUILD_BRIDGE);
if (ret == CMD_ERROR) {
if (CmdFailed(ret)) {
errmsg = _error_message;
} else {
// check which bridges can be built