summaryrefslogtreecommitdiff
path: root/station_cmd.c
diff options
context:
space:
mode:
authorpeter1138 <peter1138@openttd.org>2005-12-10 12:05:39 +0000
committerpeter1138 <peter1138@openttd.org>2005-12-10 12:05:39 +0000
commit809b03c81a841fcc428943c65760c74f3d26df57 (patch)
tree4ae75b1c93989fadb955dd408fcc2c0589671b22 /station_cmd.c
parent6a6e1450106f9944f74021edcd9aec54b3cc11ab (diff)
downloadopenttd-809b03c81a841fcc428943c65760c74f3d26df57.tar.xz
(svn r3282) - Codechange: Replace tests against CMD_ERROR with CmdFailed()
Diffstat (limited to 'station_cmd.c')
-rw-r--r--station_cmd.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/station_cmd.c b/station_cmd.c
index 631ac9214..e6f0cc580 100644
--- a/station_cmd.c
+++ b/station_cmd.c
@@ -810,7 +810,7 @@ int32 CheckFlatLandBelow(TileIndex tile, uint w, uint h, uint flags, uint invali
}
} else {
ret = DoCommandByTile(tile_cur, 0, 0, flags, CMD_LANDSCAPE_CLEAR);
- if (ret == CMD_ERROR) return CMD_ERROR;
+ if (CmdFailed(ret)) return CMD_ERROR;
cost += ret;
}
END_TILE_LOOP(tile_cur, w, h, tile)
@@ -1390,7 +1390,7 @@ int32 CmdBuildRoadStop(int x, int y, uint32 flags, uint32 p1, uint32 p2)
return CMD_ERROR;
cost = CheckFlatLandBelow(tile, 1, 1, flags, 1 << p1, NULL);
- if (cost == CMD_ERROR) return CMD_ERROR;
+ if (CmdFailed(cost)) return CMD_ERROR;
st = GetStationAround(tile, 1, 1, -1);
if (st == CHECK_STATIONS_ERR) return CMD_ERROR;