From 3199137b46089aa103dd642fa1c3236338118f13 Mon Sep 17 00:00:00 2001 From: Sacha Date: Sun, 14 Apr 2013 23:08:51 +1000 Subject: [PATCH] Use lambdas instead if we don't have C++11 support. --- thread/prioritizedworkqueue.cpp | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/thread/prioritizedworkqueue.cpp b/thread/prioritizedworkqueue.cpp index 82742e058d..75026f4f56 100644 --- a/thread/prioritizedworkqueue.cpp +++ b/thread/prioritizedworkqueue.cpp @@ -94,7 +94,12 @@ static void threadfunc(PrioritizedWorkQueue *wq) { } void ProcessWorkQueueOnThreadWhile(PrioritizedWorkQueue *wq) { - workThread = new std::thread(std::bind(&threadfunc, wq)); + workThread = new std::thread( +#if defined(__SYMBIAN32__) || defined(MAEMO) || defined(MEEGO_EDITION_HARMATTAN) || defined(BLACKBERRY) + [wq](){threadfunc(wq);} +#else + std::bind(&threadfunc, wq) + ); } void StopProcessingWorkQueue(PrioritizedWorkQueue *wq) { @@ -102,4 +107,4 @@ void StopProcessingWorkQueue(PrioritizedWorkQueue *wq) { workThread->join(); delete workThread; workThread = 0; -} \ No newline at end of file +}