diff --git a/base/thread.cpp b/base/thread.cpp index dc6a710b22..6be546cd1b 100644 --- a/base/thread.cpp +++ b/base/thread.cpp @@ -109,7 +109,7 @@ ThreadID GetCurrentThreadID() { return this_thread::get_id(); } ///////////////////////////////////////////////////////////////////// // SimpleThread implementation -void SimpleThread::ThreadFunc(function fn) +void SimpleThread::ThreadFunc(function && fn) { #if defined(OMIM_OS_ANDROID) AndroidThreadAttachToJVM(); diff --git a/base/thread.hpp b/base/thread.hpp index ab4b598064..c24f9e4deb 100644 --- a/base/thread.hpp +++ b/base/thread.hpp @@ -131,7 +131,7 @@ public: void swap(SimpleThread & x) noexcept { m_thread.swap(x.m_thread); } private: - static void ThreadFunc(function fn); + static void ThreadFunc(function && fn); DISALLOW_COPY(SimpleThread);