1
0
mirror of https://github.com/OpenRCT2/OpenRCT2 synced 2026-01-06 06:32:56 +01:00

Fix #19850: Only provide default value for final arguments (#19852)

This commit is contained in:
Michał Janiszewski
2023-04-06 16:35:02 +02:00
committed by GitHub
parent 39790779bb
commit 993da08fb9
2 changed files with 2 additions and 2 deletions

View File

@@ -198,7 +198,7 @@ WindowBase* WindowSceneryScatterOpen()
auto* window = WindowFindByClass(WindowClass::SceneryScatter);
if (window == nullptr)
{
window = WindowCreate<SceneryScatterWindow>(WindowClass::SceneryScatter, 86, 100);
window = WindowCreate<SceneryScatterWindow>(WindowClass::SceneryScatter, 86, 100, 0);
}
return window;

View File

@@ -587,7 +587,7 @@ T* WindowCreate(WindowClass cls, const ScreenCoordsXY& pos = {}, int32_t width =
return static_cast<T*>(WindowCreate(std::make_unique<T>(), cls, pos, width, height, flags));
}
template<typename T, typename... TArgs, typename std::enable_if<std::is_base_of<WindowBase, T>::value>::type* = nullptr>
T* WindowCreate(WindowClass cls, int32_t width, int32_t height, uint32_t flags = 0, TArgs&&... args)
T* WindowCreate(WindowClass cls, int32_t width, int32_t height, uint32_t flags, TArgs&&... args)
{
return static_cast<T*>(
WindowCreate(std::make_unique<T>(std::forward<TArgs>(args)...), cls, {}, width, height, flags | WF_AUTO_POSITION));