summaryrefslogtreecommitdiff
path: root/src/date_gui.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/date_gui.cpp')
-rw-r--r--src/date_gui.cpp10
1 files changed, 5 insertions, 5 deletions
diff --git a/src/date_gui.cpp b/src/date_gui.cpp
index b2421556c..771d0e1e0 100644
--- a/src/date_gui.cpp
+++ b/src/date_gui.cpp
@@ -38,22 +38,22 @@ struct SetDateWindow : Window {
* @param max_year the maximum year (inclusive) to show in the year dropdown
* @param callback the callback to call once a date has been selected
*/
- SetDateWindow(const WindowDesc *desc, WindowNumber window_number, Window *parent, Date initial_date, Year min_year, Year max_year, SetDateCallback *callback) :
- Window(),
+ SetDateWindow(WindowDesc *desc, WindowNumber window_number, Window *parent, Date initial_date, Year min_year, Year max_year, SetDateCallback *callback) :
+ Window(desc),
callback(callback),
min_year(max(MIN_YEAR, min_year)),
max_year(min(MAX_YEAR, max_year))
{
assert(this->min_year <= this->max_year);
this->parent = parent;
- this->InitNested(desc, window_number);
+ this->InitNested(window_number);
if (initial_date == 0) initial_date = _date;
ConvertDateToYMD(initial_date, &this->date);
this->date.year = Clamp(this->date.year, min_year, max_year);
}
- virtual Point OnInitialPosition(const WindowDesc *desc, int16 sm_width, int16 sm_height, int window_number)
+ virtual Point OnInitialPosition(int16 sm_width, int16 sm_height, int window_number)
{
Point pt = { this->parent->left + this->parent->width / 2 - sm_width / 2, this->parent->top + this->parent->height / 2 - sm_height / 2 };
return pt;
@@ -194,7 +194,7 @@ static const NWidgetPart _nested_set_date_widgets[] = {
};
/** Description of the date setting window. */
-static const WindowDesc _set_date_desc(
+static WindowDesc _set_date_desc(
WDP_CENTER, 0, 0,
WC_SET_DATE, WC_NONE,
0,