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:
@@ -548,10 +548,10 @@ static WindowDesc _linkgraph_legend_desc(
|
||||
*/
|
||||
void ShowLinkGraphLegend()
|
||||
{
|
||||
AllocateWindowDescFront<LinkGraphLegendWindow>(&_linkgraph_legend_desc, 0);
|
||||
AllocateWindowDescFront<LinkGraphLegendWindow>(_linkgraph_legend_desc, 0);
|
||||
}
|
||||
|
||||
LinkGraphLegendWindow::LinkGraphLegendWindow(WindowDesc *desc, int window_number) : Window(desc)
|
||||
LinkGraphLegendWindow::LinkGraphLegendWindow(WindowDesc &desc, int window_number) : Window(desc)
|
||||
{
|
||||
this->num_cargo = _sorted_cargo_specs.size();
|
||||
|
||||
|
||||
Reference in New Issue
Block a user