1
0
mirror of https://github.com/OpenTTD/OpenTTD synced 2026-01-20 19:02:41 +01:00

Codechange: change 'return existing window' to a template parameter

This change is made to make it possible to pass arbitrary other parameters
to the constructor of the window instances.
This commit is contained in:
Rubidium
2025-02-01 20:54:10 +01:00
committed by rubidium42
parent 9238cb7270
commit 8f72a478f0
7 changed files with 29 additions and 17 deletions

View File

@@ -723,7 +723,7 @@ void ShowNewGRFInspectWindow(GrfSpecFeature feature, uint index, const uint32_t
WindowNumber wno = GetInspectWindowNumber(feature, index);
WindowDesc &desc = (feature == GSF_TRAINS || feature == GSF_ROADVEHICLES) ? _newgrf_inspect_chain_desc : _newgrf_inspect_desc;
NewGRFInspectWindow *w = AllocateWindowDescFront<NewGRFInspectWindow>(desc, wno, true);
NewGRFInspectWindow *w = AllocateWindowDescFront<NewGRFInspectWindow, true>(desc, wno);
w->SetCallerGRFID(grfid);
}