summaryrefslogtreecommitdiff
path: root/src/industry_cmd.cpp
diff options
context:
space:
mode:
authorrubidium <rubidium@openttd.org>2010-01-18 22:57:21 +0000
committerrubidium <rubidium@openttd.org>2010-01-18 22:57:21 +0000
commit4d93b704d9f0e6e58dac1d97f79a05bd4320c43f (patch)
treef80050fa083b86d7a7d75efd1ae49a04b358666d /src/industry_cmd.cpp
parentd8e126d98ddc35df0ac97bd35a076edf1cf172c8 (diff)
downloadopenttd-4d93b704d9f0e6e58dac1d97f79a05bd4320c43f.tar.xz
(svn r18866) -Codechange: remove the CmdFailed(ret)/CmdSucceeded(ret) wrapper functions
Diffstat (limited to 'src/industry_cmd.cpp')
-rw-r--r--src/industry_cmd.cpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/industry_cmd.cpp b/src/industry_cmd.cpp
index b2eb905f5..e30f339d8 100644
--- a/src/industry_cmd.cpp
+++ b/src/industry_cmd.cpp
@@ -1333,13 +1333,13 @@ static bool CheckIfIndustryTilesAreFree(TileIndex tile, const IndustryTileTable
/* Clear the tiles as OWNER_TOWN to not affect town rating, and to not clear protected buildings */
CompanyID old_company = _current_company;
_current_company = OWNER_TOWN;
- bool not_clearable = CmdFailed(DoCommand(cur_tile, 0, 0, DC_NONE, CMD_LANDSCAPE_CLEAR));
+ bool not_clearable = DoCommand(cur_tile, 0, 0, DC_NONE, CMD_LANDSCAPE_CLEAR).Failed();
_current_company = old_company;
if (not_clearable) return false;
} else {
/* Clear the tiles, but do not affect town ratings */
- bool not_clearable = CmdFailed(DoCommand(cur_tile, 0, 0, DC_AUTO | DC_NO_TEST_TOWN_RATING | DC_NO_MODIFY_TOWN_RATING, CMD_LANDSCAPE_CLEAR));
+ bool not_clearable = DoCommand(cur_tile, 0, 0, DC_AUTO | DC_NO_TEST_TOWN_RATING | DC_NO_MODIFY_TOWN_RATING, CMD_LANDSCAPE_CLEAR).Failed();
if (not_clearable) return false;
}
@@ -1451,7 +1451,7 @@ static bool CheckIfCanLevelIndustryPlatform(TileIndex tile, DoCommandFlag flags,
}
/* This is not 100% correct check, but the best we can do without modifying the map.
* What is missing, is if the difference in height is more than 1.. */
- if (CmdFailed(DoCommand(tile_walk, SLOPE_N, (curh > h) ? 0 : 1, flags & ~DC_EXEC, CMD_TERRAFORM_LAND))) {
+ if (DoCommand(tile_walk, SLOPE_N, (curh > h) ? 0 : 1, flags & ~DC_EXEC, CMD_TERRAFORM_LAND).Failed()) {
_current_company = old_company;
return false;
}