diff options
author | Liang Qi <liang.qi@qt.io> | 2016-06-17 10:53:42 +0200 |
---|---|---|
committer | Liang Qi <liang.qi@qt.io> | 2016-06-17 10:53:42 +0200 |
commit | 3cb56800d581dabd18e354a24f018c55bd91f748 (patch) | |
tree | 9b8e95cf62e22026463a0f87a3625b279f457aad /src/corelib/thread/qmutexpool_p.h | |
parent | aed7540d45096791d1a824f500694a15426fd94b (diff) | |
parent | 3d8c8daae109fbd6d60e43c3d4457b581e5e62a3 (diff) |
Merge remote-tracking branch 'origin/5.7' into dev
Conflicts:
tests/auto/widgets/itemviews/qlistview/tst_qlistview.cpp
Change-Id: If899cda251b4dc8b8a7c6764520e88ab719737cd
Diffstat (limited to 'src/corelib/thread/qmutexpool_p.h')
-rw-r--r-- | src/corelib/thread/qmutexpool_p.h | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/src/corelib/thread/qmutexpool_p.h b/src/corelib/thread/qmutexpool_p.h index 33e9a52cb7..796e65d960 100644 --- a/src/corelib/thread/qmutexpool_p.h +++ b/src/corelib/thread/qmutexpool_p.h @@ -66,7 +66,7 @@ public: ~QMutexPool(); inline QMutex *get(const void *address) { - int index = uint(quintptr(address)) % count; + int index = uint(quintptr(address)) % mutexes.count(); QMutex *m = mutexes[index].load(); if (m) return m; @@ -78,8 +78,7 @@ public: private: QMutex *createMutex(int index); - int count; - QAtomicPointer<QMutex> *mutexes; + QVarLengthArray<QAtomicPointer<QMutex>, 131> mutexes; QMutex::RecursionMode recursionMode; }; |