Codechange: Pass WindowDesc by reference instead of pointer. (#12771)
WindowDesc as passed to Windows is not optional so don't allow to it to be nullptr.
This commit is contained in:
@@ -42,7 +42,7 @@ struct OskWindow : public Window {
|
||||
std::string orig_str; ///< Original string.
|
||||
bool shift; ///< Is the shift effectively pressed?
|
||||
|
||||
OskWindow(WindowDesc *desc, Window *parent, WidgetID button) : Window(desc)
|
||||
OskWindow(WindowDesc &desc, Window *parent, WidgetID button) : Window(desc)
|
||||
{
|
||||
this->parent = parent;
|
||||
assert(parent != nullptr);
|
||||
@@ -397,7 +397,7 @@ void ShowOnScreenKeyboard(Window *parent, WidgetID button)
|
||||
CloseWindowById(WC_OSK, 0);
|
||||
|
||||
GetKeyboardLayout();
|
||||
new OskWindow(&_osk_desc, parent, button);
|
||||
new OskWindow(_osk_desc, parent, button);
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user