diff --git a/loader/src/loader/LoaderImpl.cpp b/loader/src/loader/LoaderImpl.cpp index cc3f7117..d97b676e 100644 --- a/loader/src/loader/LoaderImpl.cpp +++ b/loader/src/loader/LoaderImpl.cpp @@ -691,7 +691,7 @@ bool Loader::Impl::loadHooks() { return !hadErrors; } -void Loader::Impl::queueInMainThread(ScheduledFunction func) { +void Loader::Impl::queueInMainThread(const ScheduledFunction& func) { std::lock_guard lock(m_mainThreadMutex); m_mainThreadQueue.push_back(func); } diff --git a/loader/src/loader/LoaderImpl.hpp b/loader/src/loader/LoaderImpl.hpp index 2a7da942..ed080df7 100644 --- a/loader/src/loader/LoaderImpl.hpp +++ b/loader/src/loader/LoaderImpl.hpp @@ -112,7 +112,7 @@ namespace geode { void updateResources(bool forceReload); - void queueInMainThread(ScheduledFunction func); + void queueInMainThread(const ScheduledFunction& func); void executeMainThreadQueue(); bool isReadyToHook() const;