From 429bdfe55388f9890cc97b7a6ed11c48c725e104 Mon Sep 17 00:00:00 2001 From: Constantin Shalnev Date: Wed, 5 Aug 2015 18:42:13 +0300 Subject: [PATCH] ThreadFunc takes function by refref --- base/thread.cpp | 2 +- base/thread.hpp | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) 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);