mirror of
https://github.com/OpenTTD/OpenTTD
synced 2026-01-18 18:02:37 +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:
@@ -230,7 +230,7 @@ struct CheatWindow : Window {
|
||||
uint line_height;
|
||||
Dimension icon; ///< Dimension of company icon sprite
|
||||
|
||||
CheatWindow(WindowDesc *desc) : Window(desc)
|
||||
CheatWindow(WindowDesc &desc) : Window(desc)
|
||||
{
|
||||
this->InitNested();
|
||||
}
|
||||
@@ -436,5 +436,5 @@ static WindowDesc _cheats_desc(
|
||||
void ShowCheatWindow()
|
||||
{
|
||||
CloseWindowById(WC_CHEATS, 0);
|
||||
new CheatWindow(&_cheats_desc);
|
||||
new CheatWindow(_cheats_desc);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user