From 2eef026fe35b9236606062f7d8a59d5661a5c748 Mon Sep 17 00:00:00 2001 From: rubidium Date: Thu, 8 May 2008 11:31:41 +0000 Subject: (svn r13004) -Codechange: replace AllocateWindow and AllocateWindowDesc with a Window constructor. --- src/rail_gui.cpp | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'src/rail_gui.cpp') diff --git a/src/rail_gui.cpp b/src/rail_gui.cpp index 5c6f9fe76..2fcbc489c 100644 --- a/src/rail_gui.cpp +++ b/src/rail_gui.cpp @@ -1226,10 +1226,10 @@ static void ShowStationBuilder() { Window *w; if (GetNumStationClasses() <= 2 && GetNumCustomStations(STAT_CLASS_DFLT) == 1) { - w = AllocateWindowDesc(&_station_builder_desc); + w = new Window(&_station_builder_desc); _railstation.newstations = false; } else { - w = AllocateWindowDesc(&_newstation_builder_desc); + w = new Window(&_newstation_builder_desc); _railstation.newstations = true; _railstation.station_count = GetNumCustomStations(_railstation.station_class); @@ -1397,7 +1397,7 @@ static const WindowDesc _signal_builder_desc = { */ static void ShowSignalBuilder() { - AllocateWindowDesc(&_signal_builder_desc); + new Window(&_signal_builder_desc); } /** Enum referring to the widgets of the build rail depot window */ @@ -1473,7 +1473,7 @@ static const WindowDesc _build_depot_desc = { static void ShowBuildTrainDepotPicker() { - AllocateWindowDesc(&_build_depot_desc); + new Window(&_build_depot_desc); } /** Enum referring to the widgets of the build NewGRF rail waypoint window */ @@ -1576,7 +1576,7 @@ static const WindowDesc _build_waypoint_desc = { static void ShowBuildWaypointPicker() { - Window *w = AllocateWindowDesc(&_build_waypoint_desc); + Window *w = new Window(&_build_waypoint_desc); w->hscroll.cap = 5; w->hscroll.count = _waypoint_count; } -- cgit v1.2.3-70-g09d2