summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorsmatz <smatz@openttd.org>2010-06-11 00:20:24 +0000
committersmatz <smatz@openttd.org>2010-06-11 00:20:24 +0000
commite71fd4bb57fe02c28372eb087985cd1d535de2da (patch)
treeeac637484419dd621d97f71cdb83eb6cdf10bd7a
parentc4175b752a11b3b8c0c2d6b6677493f942b11fb8 (diff)
downloadopenttd-e71fd4bb57fe02c28372eb087985cd1d535de2da.tar.xz
(svn r19958) -Codechange: move common code from Waypoint and Station destructors to BaseStation destructor
-rw-r--r--src/station.cpp3
-rw-r--r--src/waypoint.cpp2
2 files changed, 2 insertions, 3 deletions
diff --git a/src/station.cpp b/src/station.cpp
index 47389d79c..26305cd40 100644
--- a/src/station.cpp
+++ b/src/station.cpp
@@ -45,6 +45,8 @@ BaseStation::~BaseStation()
DeleteWindowById(WC_ROADVEH_LIST, wno | (VEH_ROAD << 11));
DeleteWindowById(WC_SHIPS_LIST, wno | (VEH_SHIP << 11));
DeleteWindowById(WC_AIRCRAFT_LIST, wno | (VEH_AIRCRAFT << 11));
+
+ this->sign.MarkDirty();
}
Station::Station(TileIndex tile) :
@@ -88,7 +90,6 @@ Station::~Station()
}
}
- this->sign.MarkDirty();
InvalidateWindowData(WC_STATION_LIST, this->owner, 0);
DeleteWindowById(WC_STATION_VIEW, index);
diff --git a/src/waypoint.cpp b/src/waypoint.cpp
index bc7bf2975..9500aba82 100644
--- a/src/waypoint.cpp
+++ b/src/waypoint.cpp
@@ -52,6 +52,4 @@ Waypoint::~Waypoint()
if (CleaningPool()) return;
DeleteWindowById(WC_WAYPOINT_VIEW, this->index);
RemoveOrderFromAllVehicles(OT_GOTO_WAYPOINT, this->index);
-
- this->sign.MarkDirty();
}