(svn r10200) -Codechange: add "shortcut" for !CmdFailed (CmdSucceeded).

This commit is contained in:
rubidium
2007-06-18 16:42:40 +00:00
parent fad2a36b8f
commit b09431478d
13 changed files with 49 additions and 47 deletions

View File

@@ -704,7 +704,7 @@ CommandCost CmdRemoveLongRoad(TileIndex end_tile, uint32 flags, uint32 p1, uint3
/* try to remove the halves. */
if (bits != 0) {
ret = DoCommand(tile, rt << 4 | bits, 0, flags, CMD_REMOVE_ROAD);
if (!CmdFailed(ret)) cost += ret;
if (CmdSucceeded(ret)) cost += ret;
}
if (tile == end_tile) break;