diff --git a/src/openrct2/interface/Window.cpp b/src/openrct2/interface/Window.cpp index 99f4b209b0..b0f6155d14 100644 --- a/src/openrct2/interface/Window.cpp +++ b/src/openrct2/interface/Window.cpp @@ -224,7 +224,7 @@ void WindowClose(WindowBase& w) void WindowFlushDead() { // Remove all windows in g_window_list that have the WF_DEAD flag - g_window_list.remove_if([](const std::shared_ptr& w) -> bool { return w->flags & WF_DEAD; }); + g_window_list.remove_if([](auto&& w) -> bool { return w->flags & WF_DEAD; }); } template static void WindowCloseByCondition(TPred pred, uint32_t flags = WindowCloseFlags::None)