diff options
author | peter1138 <peter1138@openttd.org> | 2005-12-10 12:05:39 +0000 |
---|---|---|
committer | peter1138 <peter1138@openttd.org> | 2005-12-10 12:05:39 +0000 |
commit | 809b03c81a841fcc428943c65760c74f3d26df57 (patch) | |
tree | 4ae75b1c93989fadb955dd408fcc2c0589671b22 /rail_cmd.c | |
parent | 6a6e1450106f9944f74021edcd9aec54b3cc11ab (diff) | |
download | openttd-809b03c81a841fcc428943c65760c74f3d26df57.tar.xz |
(svn r3282) - Codechange: Replace tests against CMD_ERROR with CmdFailed()
Diffstat (limited to 'rail_cmd.c')
-rw-r--r-- | rail_cmd.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/rail_cmd.c b/rail_cmd.c index 7a7bd68c8..bab602ade 100644 --- a/rail_cmd.c +++ b/rail_cmd.c @@ -1099,12 +1099,12 @@ static int32 ClearTile_Track(TileIndex tile, byte flags) case RAIL_TYPE_SIGNALS: if (_m[tile].m3 & _signals_table_both[0]) { ret = DoCommandByTile(tile, 0, 0, flags, CMD_REMOVE_SIGNALS); - if (ret == CMD_ERROR) return CMD_ERROR; + if (CmdFailed(ret)) return CMD_ERROR; cost += ret; } if (_m[tile].m3 & _signals_table_both[3]) { ret = DoCommandByTile(tile, 3, 0, flags, CMD_REMOVE_SIGNALS); - if (ret == CMD_ERROR) return CMD_ERROR; + if (CmdFailed(ret)) return CMD_ERROR; cost += ret; } @@ -1121,7 +1121,7 @@ static int32 ClearTile_Track(TileIndex tile, byte flags) for (i = 0; m5 != 0; i++, m5 >>= 1) { if (m5 & 1) { ret = DoCommandByTile(tile, 0, i, flags, CMD_REMOVE_SINGLE_RAIL); - if (ret == CMD_ERROR) return CMD_ERROR; + if (CmdFailed(ret)) return CMD_ERROR; cost += ret; } } |