diff options
Diffstat (limited to 'src/concurrent')
-rw-r--r-- | src/concurrent/qtconcurrentcompilertest.h | 2 | ||||
-rw-r--r-- | src/concurrent/qtconcurrentfilterkernel.h | 2 | ||||
-rw-r--r-- | src/concurrent/qtconcurrentfunctionwrappers.h | 2 | ||||
-rw-r--r-- | src/concurrent/qtconcurrentmapkernel.h | 2 | ||||
-rw-r--r-- | src/concurrent/qtconcurrentrun.h | 8 |
5 files changed, 3 insertions, 13 deletions
diff --git a/src/concurrent/qtconcurrentcompilertest.h b/src/concurrent/qtconcurrentcompilertest.h index cddfd06ca1..72cf1670a0 100644 --- a/src/concurrent/qtconcurrentcompilertest.h +++ b/src/concurrent/qtconcurrentcompilertest.h @@ -52,7 +52,7 @@ template<class T> class HasResultType { typedef char Yes; typedef void *No; - template<typename U> static Yes test(int, const typename U::result_type * = 0); + template<typename U> static Yes test(int, const typename U::result_type * = nullptr); template<typename U> static No test(double); public: enum { Value = (sizeof(test<T>(0)) == sizeof(Yes)) }; diff --git a/src/concurrent/qtconcurrentfilterkernel.h b/src/concurrent/qtconcurrentfilterkernel.h index 9cbea2e671..e921a3d51a 100644 --- a/src/concurrent/qtconcurrentfilterkernel.h +++ b/src/concurrent/qtconcurrentfilterkernel.h @@ -266,7 +266,7 @@ public: if (keep(*it)) this->reportResult(&(*it), index); else - this->reportResult(0, index); + this->reportResult(nullptr, index); return false; } diff --git a/src/concurrent/qtconcurrentfunctionwrappers.h b/src/concurrent/qtconcurrentfunctionwrappers.h index 734bb29df1..7ba6720e03 100644 --- a/src/concurrent/qtconcurrentfunctionwrappers.h +++ b/src/concurrent/qtconcurrentfunctionwrappers.h @@ -225,13 +225,11 @@ struct PushBackWrapper return c.push_back(u); } -#ifdef Q_COMPILER_RVALUE_REFS template <class C, class U> inline void operator()(C &c, U &&u) const { return c.push_back(u); } -#endif }; template <typename Functor, bool foo = HasResultType<Functor>::Value> diff --git a/src/concurrent/qtconcurrentmapkernel.h b/src/concurrent/qtconcurrentmapkernel.h index 3424124118..87fcf30cf9 100644 --- a/src/concurrent/qtconcurrentmapkernel.h +++ b/src/concurrent/qtconcurrentmapkernel.h @@ -74,7 +74,7 @@ public: Iterator it = sequenceBeginIterator; std::advance(it, beginIndex); for (int i = beginIndex; i < endIndex; ++i) { - runIteration(it, i, 0); + runIteration(it, i, nullptr); std::advance(it, 1); } diff --git a/src/concurrent/qtconcurrentrun.h b/src/concurrent/qtconcurrentrun.h index 6001010a78..22dae70460 100644 --- a/src/concurrent/qtconcurrentrun.h +++ b/src/concurrent/qtconcurrentrun.h @@ -99,8 +99,6 @@ QFuture<T> run(T (*functionPointer)(Param1, Param2, Param3, Param4, Param5), con return (new StoredFunctorCall5<T, T (*)(Param1, Param2, Param3, Param4, Param5), Arg1, Arg2, Arg3, Arg4, Arg5>(functionPointer, arg1, arg2, arg3, arg4, arg5))->start(); } -#if defined(Q_COMPILER_DECLTYPE) && defined(Q_COMPILER_AUTO_FUNCTION) - template <typename Functor> auto run(Functor functor) -> typename std::enable_if<!QtPrivate::HasResultType<Functor>::Value, QFuture<decltype(functor())>>::type { @@ -148,8 +146,6 @@ auto run(Functor functor, const Arg1 &arg1, const Arg2 &arg2, const Arg3 &arg3, return (new StoredFunctorCall5<result_type, Functor, Arg1, Arg2, Arg3, Arg4, Arg5>(functor, arg1, arg2, arg3, arg4, arg5))->start(); } -#endif - template <typename FunctionObject> QFuture<typename FunctionObject::result_type> run(FunctionObject functionObject) { @@ -370,8 +366,6 @@ QFuture<T> run(QThreadPool *pool, T (*functionPointer)(Param1, Param2, Param3, P return (new StoredFunctorCall5<T, T (*)(Param1, Param2, Param3, Param4, Param5), Arg1, Arg2, Arg3, Arg4, Arg5>(functionPointer, arg1, arg2, arg3, arg4, arg5))->start(pool); } -#if defined(Q_COMPILER_DECLTYPE) && defined(Q_COMPILER_AUTO_FUNCTION) - template <typename Functor> auto run(QThreadPool *pool, Functor functor) -> typename std::enable_if<!QtPrivate::HasResultType<Functor>::Value, QFuture<decltype(functor())>>::type { @@ -419,8 +413,6 @@ auto run(QThreadPool *pool, Functor functor, const Arg1 &arg1, const Arg2 &arg2, return (new StoredFunctorCall5<result_type, Functor, Arg1, Arg2, Arg3, Arg4, Arg5>(functor, arg1, arg2, arg3, arg4, arg5))->start(pool); } -#endif - template <typename FunctionObject> QFuture<typename FunctionObject::result_type> run(QThreadPool *pool, FunctionObject functionObject) { |