summaryrefslogtreecommitdiff
path: root/src/waypoint_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/waypoint_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/waypoint_gui.cpp')
-rw-r--r--src/waypoint_gui.cpp8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/waypoint_gui.cpp b/src/waypoint_gui.cpp
index cd50a9ca8..f0d6239c3 100644
--- a/src/waypoint_gui.cpp
+++ b/src/waypoint_gui.cpp
@@ -52,18 +52,18 @@ public:
* @param desc The description of the window.
* @param window_number The window number, in this case the waypoint's ID.
*/
- WaypointWindow(const WindowDesc *desc, WindowNumber window_number) : Window()
+ WaypointWindow(WindowDesc *desc, WindowNumber window_number) : Window(desc)
{
this->wp = Waypoint::Get(window_number);
this->vt = (wp->string_id == STR_SV_STNAME_WAYPOINT) ? VEH_TRAIN : VEH_SHIP;
- this->CreateNestedTree(desc);
+ this->CreateNestedTree();
if (this->vt == VEH_TRAIN) {
this->GetWidget<NWidgetCore>(WID_W_SHOW_VEHICLES)->SetDataTip(STR_TRAIN, STR_STATION_VIEW_SCHEDULED_TRAINS_TOOLTIP);
this->GetWidget<NWidgetCore>(WID_W_CENTER_VIEW)->tool_tip = STR_WAYPOINT_VIEW_CENTER_TOOLTIP;
this->GetWidget<NWidgetCore>(WID_W_RENAME)->tool_tip = STR_WAYPOINT_VIEW_CHANGE_WAYPOINT_NAME;
}
- this->FinishInitNested(desc, window_number);
+ this->FinishInitNested(window_number);
if (this->wp->owner != OWNER_NONE) this->owner = this->wp->owner;
this->flags |= WF_DISABLE_VP_SCROLL;
@@ -170,7 +170,7 @@ static const NWidgetPart _nested_waypoint_view_widgets[] = {
};
/** The description of the waypoint view. */
-static const WindowDesc _waypoint_view_desc(
+static WindowDesc _waypoint_view_desc(
WDP_AUTO, 260, 118,
WC_WAYPOINT_VIEW, WC_NONE,
0,