mirror of
https://github.com/OpenTTD/OpenTTD
synced 2026-01-21 03:12:41 +01:00
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:
@@ -121,7 +121,7 @@ struct GameManualTextfileWindow : public TextfileWindow {
|
||||
/** Window class displaying the help window. */
|
||||
struct HelpWindow : public Window {
|
||||
|
||||
HelpWindow(WindowDesc *desc, WindowNumber number) : Window(desc)
|
||||
HelpWindow(WindowDesc &desc, WindowNumber number) : Window(desc)
|
||||
{
|
||||
this->InitNested(number);
|
||||
|
||||
@@ -202,5 +202,5 @@ static WindowDesc _helpwin_desc(
|
||||
|
||||
void ShowHelpWindow()
|
||||
{
|
||||
AllocateWindowDescFront<HelpWindow>(&_helpwin_desc, 0);
|
||||
AllocateWindowDescFront<HelpWindow>(_helpwin_desc, 0);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user