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:
+4
-4
@@ -86,7 +86,7 @@ private:
|
||||
}
|
||||
|
||||
public:
|
||||
PerformanceLeagueWindow(WindowDesc *desc, WindowNumber window_number) : Window(desc)
|
||||
PerformanceLeagueWindow(WindowDesc &desc, WindowNumber window_number) : Window(desc)
|
||||
{
|
||||
this->InitNested(window_number);
|
||||
this->companies.ForceRebuild();
|
||||
@@ -209,7 +209,7 @@ static WindowDesc _performance_league_desc(
|
||||
|
||||
void ShowPerformanceLeagueTable()
|
||||
{
|
||||
AllocateWindowDescFront<PerformanceLeagueWindow>(&_performance_league_desc, 0);
|
||||
AllocateWindowDescFront<PerformanceLeagueWindow>(_performance_league_desc, 0);
|
||||
}
|
||||
|
||||
static void HandleLinkClick(Link link)
|
||||
@@ -298,7 +298,7 @@ private:
|
||||
}
|
||||
|
||||
public:
|
||||
ScriptLeagueWindow(WindowDesc *desc, LeagueTableID table) : Window(desc)
|
||||
ScriptLeagueWindow(WindowDesc &desc, LeagueTableID table) : Window(desc)
|
||||
{
|
||||
this->table = table;
|
||||
this->BuildTable();
|
||||
@@ -445,7 +445,7 @@ static WindowDesc _script_league_desc(
|
||||
void ShowScriptLeagueTable(LeagueTableID table)
|
||||
{
|
||||
if (!LeagueTable::IsValidID(table)) return;
|
||||
AllocateWindowDescFront<ScriptLeagueWindow>(&_script_league_desc, table);
|
||||
AllocateWindowDescFront<ScriptLeagueWindow>(_script_league_desc, table);
|
||||
}
|
||||
|
||||
void ShowFirstLeagueTable()
|
||||
|
||||
Reference in New Issue
Block a user