summaryrefslogtreecommitdiff
path: root/src/object_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/object_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/object_gui.cpp')
-rw-r--r--src/object_gui.cpp8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/object_gui.cpp b/src/object_gui.cpp
index 413cb23b8..6e967a6fe 100644
--- a/src/object_gui.cpp
+++ b/src/object_gui.cpp
@@ -72,16 +72,16 @@ class BuildObjectWindow : public PickerWindowBase {
}
public:
- BuildObjectWindow(const WindowDesc *desc, Window *w) : PickerWindowBase(w), info_height(1)
+ BuildObjectWindow(WindowDesc *desc, Window *w) : PickerWindowBase(desc, w), info_height(1)
{
- this->CreateNestedTree(desc);
+ this->CreateNestedTree();
this->vscroll = this->GetScrollbar(WID_BO_SCROLLBAR);
this->vscroll->SetCapacity(5);
this->vscroll->SetPosition(0);
this->vscroll->SetCount(ObjectClass::GetUIClassCount());
- this->FinishInitNested(desc, 0);
+ this->FinishInitNested(0);
if (this->CanRestoreSelectedObject()) {
this->SelectOtherObject(_selected_object_index);
@@ -488,7 +488,7 @@ static const NWidgetPart _nested_build_object_widgets[] = {
EndContainer(),
};
-static const WindowDesc _build_object_desc(
+static WindowDesc _build_object_desc(
WDP_AUTO, 0, 0,
WC_BUILD_OBJECT, WC_BUILD_TOOLBAR,
WDF_CONSTRUCTION,