1
0
mirror of https://github.com/OpenTTD/OpenTTD synced 2025-12-22 04:32:47 +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:
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

@@ -176,7 +176,7 @@ struct SelectGameWindow : public Window {
}
}
SelectGameWindow(WindowDesc *desc) : Window(desc)
SelectGameWindow(WindowDesc &desc) : Window(desc)
{
this->CreateNestedTree();
this->FinishInitNested(0);
@@ -465,7 +465,7 @@ static WindowDesc _select_game_desc(
void ShowSelectGameWindow()
{
new SelectGameWindow(&_select_game_desc);
new SelectGameWindow(_select_game_desc);
}
static void AskExitGameCallback(Window *, bool confirmed)