summaryrefslogtreecommitdiff
path: root/src/vehicle_gui.cpp
diff options
context:
space:
mode:
authorrubidium <rubidium@openttd.org>2008-05-08 11:50:34 +0000
committerrubidium <rubidium@openttd.org>2008-05-08 11:50:34 +0000
commit92aac531c2fdc3e58c108a35e66f723360f46a9a (patch)
tree23ad171b2093a5c5980b9d912bf60056102af9fa /src/vehicle_gui.cpp
parent51cda2252ceb088d75f25074f1e83e8eec5f18b6 (diff)
downloadopenttd-92aac531c2fdc3e58c108a35e66f723360f46a9a.tar.xz
(svn r13005) -Codechange: prepare AllocateWindowDescFront for subclassing of Window.
Diffstat (limited to 'src/vehicle_gui.cpp')
-rw-r--r--src/vehicle_gui.cpp14
1 files changed, 7 insertions, 7 deletions
diff --git a/src/vehicle_gui.cpp b/src/vehicle_gui.cpp
index 13156b350..bab13faa5 100644
--- a/src/vehicle_gui.cpp
+++ b/src/vehicle_gui.cpp
@@ -451,7 +451,7 @@ void ShowVehicleRefitWindow(const Vehicle *v, VehicleOrderID order)
DeleteWindowById(WC_VEHICLE_REFIT, v->index);
- w = AllocateWindowDescFront(&_vehicle_refit_desc, v->index);
+ w = AllocateWindowDescFront<Window>(&_vehicle_refit_desc, v->index);
WP(w, refit_d).order = order;
if (w != NULL) {
@@ -1244,18 +1244,18 @@ static void ShowVehicleListWindowLocal(PlayerID player, uint16 VLW_flag, Vehicle
switch (vehicle_type) {
default: NOT_REACHED();
case VEH_TRAIN:
- w = AllocateWindowDescFront(&_player_vehicle_list_train_desc, num);
+ w = AllocateWindowDescFront<Window>(&_player_vehicle_list_train_desc, num);
if (w != NULL) ResizeWindow(w, 65, 38);
break;
case VEH_ROAD:
- w = AllocateWindowDescFront(&_player_vehicle_list_road_veh_desc, num);
+ w = AllocateWindowDescFront<Window>(&_player_vehicle_list_road_veh_desc, num);
if (w != NULL) ResizeWindow(w, 0, 38);
break;
case VEH_SHIP:
- w = AllocateWindowDescFront(&_player_vehicle_list_ship_desc, num);
+ w = AllocateWindowDescFront<Window>(&_player_vehicle_list_ship_desc, num);
break;
case VEH_AIRCRAFT:
- w = AllocateWindowDescFront(&_player_vehicle_list_aircraft_desc, num);
+ w = AllocateWindowDescFront<Window>(&_player_vehicle_list_aircraft_desc, num);
break;
}
@@ -1671,7 +1671,7 @@ static void ShowVehicleDetailsWindow(const Vehicle *v)
{
DeleteWindowById(WC_VEHICLE_ORDERS, v->index);
DeleteWindowById(WC_VEHICLE_DETAILS, v->index);
- AllocateWindowDescFront(&_vehicle_details_desc, v->index);
+ AllocateWindowDescFront<Window>(&_vehicle_details_desc, v->index);
}
@@ -1747,7 +1747,7 @@ static const int VV_INITIAL_VIEWPORT_HEIGHT_TRAIN = 102;
/** Shows the vehicle view window of the given vehicle. */
void ShowVehicleViewWindow(const Vehicle *v)
{
- Window *w = AllocateWindowDescFront((v->type == VEH_TRAIN) ? &_train_view_desc : &_vehicle_view_desc, v->index);
+ Window *w = AllocateWindowDescFront<Window>((v->type == VEH_TRAIN) ? &_train_view_desc : &_vehicle_view_desc, v->index);
if (w != NULL) {
w->caption_color = v->owner;