1
0
mirror of https://github.com/OpenRCT2/OpenRCT2 synced 2025-12-22 15:23:01 +01:00

Remove WindowFlushDead, shouldn't be used directly

This commit is contained in:
ζeh Matt
2024-12-04 21:18:25 +02:00
parent 2c6c1161ed
commit ba30f781f4
2 changed files with 2 additions and 8 deletions

View File

@@ -141,7 +141,8 @@ void WindowUpdateAllViewports()
*/
void WindowUpdateAll()
{
WindowFlushDead();
// Remove all windows in g_window_list that have the WF_DEAD flag
g_window_list.remove_if([](auto&& w) -> bool { return w->flags & WF_DEAD; });
// Periodic update happens every second so 40 ticks.
if (gCurrentRealTimeTicks >= gWindowUpdateTicks)
@@ -237,12 +238,6 @@ void WindowClose(WindowBase& w)
w.flags |= WF_DEAD;
}
void WindowFlushDead()
{
// Remove all windows in g_window_list that have the WF_DEAD flag
g_window_list.remove_if([](auto&& w) -> bool { return w->flags & WF_DEAD; });
}
template<typename TPred>
static void WindowCloseByCondition(TPred pred, uint32_t flags = WindowCloseFlags::None)
{