(svn r13004) -Codechange: replace AllocateWindow and AllocateWindowDesc with a Window constructor.

This commit is contained in:
rubidium
2008-05-08 11:31:41 +00:00
parent 5a7fcf9aa3
commit 51cda2252c
22 changed files with 121 additions and 141 deletions

View File

@@ -817,7 +817,7 @@ static const WindowDesc _build_tram_depot_desc = {
static void ShowRoadDepotPicker()
{
AllocateWindowDesc(_cur_roadtype == ROADTYPE_ROAD ? &_build_road_depot_desc : &_build_tram_depot_desc);
new Window(_cur_roadtype == ROADTYPE_ROAD ? &_build_road_depot_desc : &_build_tram_depot_desc);
}
/** Enum referring to the widgets of the build road station window */
@@ -966,7 +966,7 @@ static const WindowDesc _rv_station_picker_desc = {
static void ShowRVStationPicker(RoadStopType rs)
{
Window *w = AllocateWindowDesc(&_rv_station_picker_desc);
Window *w = new Window(&_rv_station_picker_desc);
if (w == NULL) return;
w->window_class = (rs == ROADSTOP_BUS) ? WC_BUS_STATION : WC_TRUCK_STATION;