diff options
author | Thiago Macieira <thiago.macieira@intel.com> | 2012-03-26 15:29:34 -0300 |
---|---|---|
committer | Qt by Nokia <qt-info@nokia.com> | 2012-04-07 05:19:50 +0200 |
commit | 9dde45722b9ab760e8c14722904cfa4eca5663e9 (patch) | |
tree | 752fe2c80621bae6e190c246f42c64e439c9e603 /src/concurrent | |
parent | 6f51fee995cf6f4a746077209f4dbb729c463769 (diff) |
Remove references to QT_NO_STL from QtConcurrent
Same as with QtCore, remove the #ifdef and #ifndef and select the side
with STL.
Change-Id: If1440080328c7c51afe35f5944a19dafc4761ee5
Reviewed-by: Stephen Kelly <stephen.kelly@kdab.com>
Reviewed-by: Morten Johan Sørvig <morten.sorvig@nokia.com>
Diffstat (limited to 'src/concurrent')
-rw-r--r-- | src/concurrent/qtconcurrentiteratekernel.h | 31 |
1 files changed, 1 insertions, 30 deletions
diff --git a/src/concurrent/qtconcurrentiteratekernel.h b/src/concurrent/qtconcurrentiteratekernel.h index 6776ff0346..fb031a6d48 100644 --- a/src/concurrent/qtconcurrentiteratekernel.h +++ b/src/concurrent/qtconcurrentiteratekernel.h @@ -50,9 +50,7 @@ #include <QtConcurrent/qtconcurrentmedian.h> #include <QtConcurrent/qtconcurrentthreadengine.h> -#ifndef QT_NO_STL -# include <iterator> -#endif +#include <iterator> QT_BEGIN_HEADER QT_BEGIN_NAMESPACE @@ -62,15 +60,7 @@ QT_BEGIN_NAMESPACE namespace QtConcurrent { -#ifndef QT_NO_STL using std::advance; -#else - template <typename It, typename T> - void advance(It &it, T value) - { - it+=value; - } -#endif /* The BlockSizeManager class manages how many iterations a thread should @@ -149,7 +139,6 @@ public: inline void * getPointer() { return 0; } }; -#ifndef QT_NO_STL inline bool selectIteration(std::bidirectional_iterator_tag) { return false; // while @@ -164,14 +153,6 @@ inline bool selectIteration(std::random_access_iterator_tag) { return true; // for } -#else -// no stl support, always use while iteration -template <typename T> -inline bool selectIteration(T) -{ - return false; // while -} -#endif template <typename Iterator, typename T> class IterateKernel : public ThreadEngine<T> @@ -180,20 +161,10 @@ public: typedef T ResultType; IterateKernel(Iterator _begin, Iterator _end) -#if defined (QT_NO_STL) - : begin(_begin), end(_end), current(_begin), currentIndex(0), - forIteration(false), progressReportingEnabled(true) -#else : begin(_begin), end(_end), current(_begin), currentIndex(0), forIteration(selectIteration(typename std::iterator_traits<Iterator>::iterator_category())), progressReportingEnabled(true) -#endif { -#if defined (QT_NO_STL) - iterationCount = 0; -#else iterationCount = forIteration ? std::distance(_begin, _end) : 0; - -#endif } virtual ~IterateKernel() { } |