summaryrefslogtreecommitdiffstats
path: root/src/concurrent/qtconcurrentiteratekernel.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/concurrent/qtconcurrentiteratekernel.cpp')
-rw-r--r--src/concurrent/qtconcurrentiteratekernel.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/concurrent/qtconcurrentiteratekernel.cpp b/src/concurrent/qtconcurrentiteratekernel.cpp
index b735ae4137..00228f181c 100644
--- a/src/concurrent/qtconcurrentiteratekernel.cpp
+++ b/src/concurrent/qtconcurrentiteratekernel.cpp
@@ -7,7 +7,7 @@
#include "private/qfunctions_p.h"
-#if !defined(QT_NO_CONCURRENT) || defined(Q_CLANG_QDOC)
+#if !defined(QT_NO_CONCURRENT) || defined(Q_QDOC)
QT_BEGIN_NAMESPACE
@@ -67,7 +67,7 @@ namespace QtConcurrent {
*/
BlockSizeManager::BlockSizeManager(QThreadPool *pool, int iterationCount)
- : maxBlockSize(iterationCount / (pool->maxThreadCount() * 2)),
+ : maxBlockSize(iterationCount / (std::max(pool->maxThreadCount(), 1) * 2)),
beforeUser(0), afterUser(0),
m_blockSize(1)
{ }