summaryrefslogtreecommitdiff
path: root/src/waypoint_cmd.cpp
diff options
context:
space:
mode:
authoralberth <alberth@openttd.org>2010-03-20 17:58:24 +0000
committeralberth <alberth@openttd.org>2010-03-20 17:58:24 +0000
commit05d705e077cb247ee31e0a61bc410fe2b9183c6a (patch)
tree7c96d4ce3b519c3edc7def2e1769c2ae4d82a334 /src/waypoint_cmd.cpp
parenta901ab53925857a3f6ae70a045a9f0ec6362107e (diff)
downloadopenttd-05d705e077cb247ee31e0a61bc410fe2b9183c6a.tar.xz
(svn r19494) -Codechange: Remove _error_message.
Diffstat (limited to 'src/waypoint_cmd.cpp')
-rw-r--r--src/waypoint_cmd.cpp10
1 files changed, 1 insertions, 9 deletions
diff --git a/src/waypoint_cmd.cpp b/src/waypoint_cmd.cpp
index f9f0b4362..8771f27aa 100644
--- a/src/waypoint_cmd.cpp
+++ b/src/waypoint_cmd.cpp
@@ -179,11 +179,7 @@ static CommandCost IsValidTileForWaypoint(TileIndex tile, Axis axis, StationID *
Owner owner = GetTileOwner(tile);
CommandCost ret = CheckOwnership(owner);
- ret.SetGlobalErrorMessage();
- if (ret.Failed()) return ret;
-
- ret = EnsureNoVehicleOnGround(tile);
- ret.SetGlobalErrorMessage();
+ if (ret.Succeeded()) ret = EnsureNoVehicleOnGround(tile);
if (ret.Failed()) return ret;
Slope tileh = GetTileSlope(tile, NULL);
@@ -258,7 +254,6 @@ CommandCost CmdBuildRailWaypoint(TileIndex start_tile, DoCommandFlag flags, uint
Waypoint *wp = NULL;
TileArea new_location(TileArea(start_tile, width, height));
CommandCost ret = FindJoiningWaypoint(est, station_to_join, adjacent, new_location, &wp);
- ret.SetGlobalErrorMessage();
if (ret.Failed()) return ret;
/* Check if there is an already existing, deleted, waypoint close to us that we can reuse. */
@@ -276,7 +271,6 @@ CommandCost CmdBuildRailWaypoint(TileIndex start_tile, DoCommandFlag flags, uint
}
CommandCost ret = wp->rect.BeforeAddRect(start_tile, width, height, StationRect::ADD_TEST);
- ret.SetGlobalErrorMessage();
if (ret.Failed()) return ret;
} else {
/* allocate and initialize new waypoint */
@@ -399,7 +393,6 @@ CommandCost RemoveBuoy(TileIndex tile, DoCommandFlag flags)
/* remove the buoy if there is a ship on tile when company goes bankrupt... */
if (!(flags & DC_BANKRUPT)) {
CommandCost ret = EnsureNoVehicleOnGround(tile);
- ret.SetGlobalErrorMessage();
if (ret.Failed()) return ret;
}
@@ -451,7 +444,6 @@ CommandCost CmdRenameWaypoint(TileIndex tile, DoCommandFlag flags, uint32 p1, ui
if (wp->owner != OWNER_NONE) {
CommandCost ret = CheckOwnership(wp->owner);
- ret.SetGlobalErrorMessage();
if (ret.Failed()) return ret;
}