diff options
author | frosch <frosch@openttd.org> | 2013-05-26 19:23:42 +0000 |
---|---|---|
committer | frosch <frosch@openttd.org> | 2013-05-26 19:23:42 +0000 |
commit | 56e4a8c4d63b19cb037ac1ba64c5a4d7fde4350b (patch) | |
tree | f3e5c225182fce7a451af4e09e943920e0f1cc3c /src/osk_gui.cpp | |
parent | b10a4f151aa534860dcc61ecf8cba7b3589e6281 (diff) | |
download | openttd-56e4a8c4d63b19cb037ac1ba64c5a4d7fde4350b.tar.xz |
(svn r25287) -Codechange: Keep a reference to the WindowDesc in the Window after construction.
Diffstat (limited to 'src/osk_gui.cpp')
-rw-r--r-- | src/osk_gui.cpp | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/osk_gui.cpp b/src/osk_gui.cpp index 015222d4d..c234192fe 100644 --- a/src/osk_gui.cpp +++ b/src/osk_gui.cpp @@ -40,7 +40,7 @@ struct OskWindow : public Window { char *orig_str_buf; ///< Original string. bool shift; ///< Is the shift effectively pressed? - OskWindow(const WindowDesc *desc, Window *parent, int button) : Window() + OskWindow(WindowDesc *desc, Window *parent, int button) : Window(desc) { this->parent = parent; assert(parent != NULL); @@ -58,7 +58,7 @@ struct OskWindow : public Window { /* make a copy in case we need to reset later */ this->orig_str_buf = strdup(this->qs->text.buf); - this->InitNested(desc, 0); + this->InitNested(0); this->SetFocusedWidget(WID_OSK_TEXT); /* Not needed by default. */ @@ -339,7 +339,7 @@ static const NWidgetPart _nested_osk_widgets[] = { EndContainer(), }; -static const WindowDesc _osk_desc( +static WindowDesc _osk_desc( WDP_CENTER, 0, 0, WC_OSK, WC_NONE, 0, |