mirror of
https://github.com/OpenRCT2/OpenRCT2
synced 2025-12-23 15:52:55 +01:00
Remove WindowFlushDead, shouldn't be used directly
This commit is contained in:
@@ -141,7 +141,8 @@ void WindowUpdateAllViewports()
|
|||||||
*/
|
*/
|
||||||
void WindowUpdateAll()
|
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.
|
// Periodic update happens every second so 40 ticks.
|
||||||
if (gCurrentRealTimeTicks >= gWindowUpdateTicks)
|
if (gCurrentRealTimeTicks >= gWindowUpdateTicks)
|
||||||
@@ -237,12 +238,6 @@ void WindowClose(WindowBase& w)
|
|||||||
w.flags |= WF_DEAD;
|
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>
|
template<typename TPred>
|
||||||
static void WindowCloseByCondition(TPred pred, uint32_t flags = WindowCloseFlags::None)
|
static void WindowCloseByCondition(TPred pred, uint32_t flags = WindowCloseFlags::None)
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -475,7 +475,6 @@ WindowBase* WindowBringToFrontByClassWithFlags(WindowClass cls, uint16_t flags);
|
|||||||
WindowBase* WindowBringToFrontByNumber(WindowClass cls, rct_windownumber number);
|
WindowBase* WindowBringToFrontByNumber(WindowClass cls, rct_windownumber number);
|
||||||
|
|
||||||
void WindowClose(WindowBase& window);
|
void WindowClose(WindowBase& window);
|
||||||
void WindowFlushDead();
|
|
||||||
void WindowCloseByClass(WindowClass cls);
|
void WindowCloseByClass(WindowClass cls);
|
||||||
void WindowCloseByNumber(WindowClass cls, rct_windownumber number);
|
void WindowCloseByNumber(WindowClass cls, rct_windownumber number);
|
||||||
void WindowCloseByNumber(WindowClass cls, EntityId number);
|
void WindowCloseByNumber(WindowClass cls, EntityId number);
|
||||||
|
|||||||
Reference in New Issue
Block a user