From 029f5b0dad4885920078775644ca292b8aeac4b8 Mon Sep 17 00:00:00 2001 From: Andreas Kling Date: Sun, 23 Apr 2023 21:19:37 +0200 Subject: [PATCH] LibCore: Move deferred_invoke() implementation out of line --- Userland/Libraries/LibCore/EventLoop.cpp | 11 +++++++++++ Userland/Libraries/LibCore/EventLoop.h | 12 ++---------- 2 files changed, 13 insertions(+), 10 deletions(-) diff --git a/Userland/Libraries/LibCore/EventLoop.cpp b/Userland/Libraries/LibCore/EventLoop.cpp index c8f48c6ebf..98a4e6ab02 100644 --- a/Userland/Libraries/LibCore/EventLoop.cpp +++ b/Userland/Libraries/LibCore/EventLoop.cpp @@ -847,4 +847,15 @@ void EventLoop::wake() } } +void EventLoop::deferred_invoke(Function invokee) +{ + auto context = DeferredInvocationContext::construct(); + post_event(context, make(context, move(invokee))); +} + +void deferred_invoke(Function invokee) +{ + EventLoop::current().deferred_invoke(move(invokee)); +} + } diff --git a/Userland/Libraries/LibCore/EventLoop.h b/Userland/Libraries/LibCore/EventLoop.h index 8feaf4e84e..75be2f3c81 100644 --- a/Userland/Libraries/LibCore/EventLoop.h +++ b/Userland/Libraries/LibCore/EventLoop.h @@ -17,7 +17,6 @@ #include #include #include -#include #include #include #include @@ -82,11 +81,7 @@ public: void add_job(NonnullRefPtr>> job_promise); - void deferred_invoke(Function invokee) - { - auto context = DeferredInvocationContext::construct(); - post_event(context, make(context, move(invokee))); - } + void deferred_invoke(Function); void wake(); @@ -134,9 +129,6 @@ private: NonnullOwnPtr m_private; }; -inline void deferred_invoke(Function invokee) -{ - EventLoop::current().deferred_invoke(move(invokee)); -} +void deferred_invoke(Function); }