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:
Peter Nelson
2024-06-11 08:58:03 +01:00
committed by GitHub
parent 18bce69623
commit 4cf6d1dd79
68 changed files with 293 additions and 301 deletions

View File

@@ -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);
}
/**