summaryrefslogtreecommitdiff
path: root/src/build_vehicle_gui.cpp
diff options
context:
space:
mode:
authorfrosch <frosch@openttd.org>2013-05-26 19:23:42 +0000
committerfrosch <frosch@openttd.org>2013-05-26 19:23:42 +0000
commit56e4a8c4d63b19cb037ac1ba64c5a4d7fde4350b (patch)
treef3e5c225182fce7a451af4e09e943920e0f1cc3c /src/build_vehicle_gui.cpp
parentb10a4f151aa534860dcc61ecf8cba7b3589e6281 (diff)
downloadopenttd-56e4a8c4d63b19cb037ac1ba64c5a4d7fde4350b.tar.xz
(svn r25287) -Codechange: Keep a reference to the WindowDesc in the Window after construction.
Diffstat (limited to 'src/build_vehicle_gui.cpp')
-rw-r--r--src/build_vehicle_gui.cpp8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/build_vehicle_gui.cpp b/src/build_vehicle_gui.cpp
index 56a5d6321..9698e22eb 100644
--- a/src/build_vehicle_gui.cpp
+++ b/src/build_vehicle_gui.cpp
@@ -938,7 +938,7 @@ struct BuildVehicleWindow : Window {
int details_height; ///< Minimal needed height of the details panels (found so far).
Scrollbar *vscroll;
- BuildVehicleWindow(const WindowDesc *desc, TileIndex tile, VehicleType type) : Window()
+ BuildVehicleWindow(WindowDesc *desc, TileIndex tile, VehicleType type) : Window(desc)
{
this->vehicle_type = type;
this->window_number = tile == INVALID_TILE ? (int)type : tile;
@@ -962,7 +962,7 @@ struct BuildVehicleWindow : Window {
this->listview_mode = (this->window_number <= VEH_END);
- this->CreateNestedTree(desc);
+ this->CreateNestedTree();
this->vscroll = this->GetScrollbar(WID_BV_SCROLLBAR);
@@ -983,7 +983,7 @@ struct BuildVehicleWindow : Window {
this->details_height = ((this->vehicle_type == VEH_TRAIN) ? 10 : 9) * FONT_HEIGHT_NORMAL + WD_FRAMERECT_TOP + WD_FRAMERECT_BOTTOM;
- this->FinishInitNested(desc, tile == INVALID_TILE ? (int)type : tile);
+ this->FinishInitNested(tile == INVALID_TILE ? (int)type : tile);
this->owner = (tile != INVALID_TILE) ? GetTileOwner(tile) : _local_company;
@@ -1404,7 +1404,7 @@ struct BuildVehicleWindow : Window {
}
};
-static const WindowDesc _build_vehicle_desc(
+static WindowDesc _build_vehicle_desc(
WDP_AUTO, 240, 268,
WC_BUILD_VEHICLE, WC_NONE,
WDF_CONSTRUCTION,