From 803cf87885aa8b6382996940d6418250889b678c Mon Sep 17 00:00:00 2001 From: rubidium Date: Fri, 24 Jul 2009 07:38:10 +0000 Subject: (svn r16934) -Codechange: introduce a simple helper function to check whether a station is pending deletion or not --- src/terraform_gui.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/terraform_gui.cpp') diff --git a/src/terraform_gui.cpp b/src/terraform_gui.cpp index c41b2ac56..026d663f6 100644 --- a/src/terraform_gui.cpp +++ b/src/terraform_gui.cpp @@ -638,7 +638,7 @@ static void ResetLandscapeConfirmationCallback(Window *w, bool confirmed) FOR_ALL_BASE_STATIONS(st) { /* There can be buoys, remove them */ if (IsBuoyTile(st->xy)) DoCommand(st->xy, 0, 0, DC_EXEC | DC_BANKRUPT, CMD_LANDSCAPE_CLEAR); - if ((st->facilities & ~FACIL_WAYPOINT) == 0) delete st; + if (!st->IsInUse()) delete st; } MarkWholeScreenDirty(); -- cgit v1.2.3-54-g00ecf