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

@@ -28,7 +28,7 @@ uint8_t _display_opt; ///< What do we want to draw/do?
class TransparenciesWindow : public Window
{
public:
TransparenciesWindow(WindowDesc *desc, int window_number) : Window(desc)
TransparenciesWindow(WindowDesc &desc, int window_number) : Window(desc)
{
this->InitNested(window_number);
}
@@ -160,5 +160,5 @@ static WindowDesc _transparency_desc(
*/
void ShowTransparencyToolbar()
{
AllocateWindowDescFront<TransparenciesWindow>(&_transparency_desc, 0);
AllocateWindowDescFront<TransparenciesWindow>(_transparency_desc, 0);
}