mirror of
https://github.com/OpenTTD/OpenTTD
synced 2026-01-19 10:22:39 +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:
@@ -1400,7 +1400,7 @@ protected:
|
||||
public:
|
||||
friend class NWidgetSmallmapDisplay;
|
||||
|
||||
SmallMapWindow(WindowDesc *desc, int window_number) : Window(desc)
|
||||
SmallMapWindow(WindowDesc &desc, int window_number) : Window(desc)
|
||||
{
|
||||
_smallmap_industry_highlight = INVALID_INDUSTRYTYPE;
|
||||
this->overlay = std::make_unique<LinkGraphOverlay>(this, WID_SM_MAP, 0, this->GetOverlayCompanyMask(), 1);
|
||||
@@ -1994,7 +1994,7 @@ static WindowDesc _smallmap_desc(
|
||||
*/
|
||||
void ShowSmallMap()
|
||||
{
|
||||
AllocateWindowDescFront<SmallMapWindow>(&_smallmap_desc, 0);
|
||||
AllocateWindowDescFront<SmallMapWindow>(_smallmap_desc, 0);
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user