diff options
author | rubidium <rubidium@openttd.org> | 2008-05-08 11:31:41 +0000 |
---|---|---|
committer | rubidium <rubidium@openttd.org> | 2008-05-08 11:31:41 +0000 |
commit | 51cda2252ceb088d75f25074f1e83e8eec5f18b6 (patch) | |
tree | 34abcc3662d6f35a9ace2d7f77586e68242b96e7 /src/rail_gui.cpp | |
parent | 5a7fcf9aa3ce17e9f8602a682171b30cc8b1a786 (diff) | |
download | openttd-51cda2252ceb088d75f25074f1e83e8eec5f18b6.tar.xz |
(svn r13004) -Codechange: replace AllocateWindow and AllocateWindowDesc with a Window constructor.
Diffstat (limited to 'src/rail_gui.cpp')
-rw-r--r-- | src/rail_gui.cpp | 10 |
1 files changed, 5 insertions, 5 deletions
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; } |