diff options
author | Edward Welbourne <edward.welbourne@qt.io> | 2017-06-01 15:36:38 +0200 |
---|---|---|
committer | Edward Welbourne <edward.welbourne@qt.io> | 2017-06-08 13:36:00 +0000 |
commit | d3e73b4f6b758896e6328cf2f5dc7d864d27949e (patch) | |
tree | 152da9da58ebfa1615fd07d418f50b5e07c66045 /src/corelib | |
parent | 2ea90c56f2924acc5c620ed7c29a48c72a42efd3 (diff) |
Fix typo in QMutex's free-list's Sizes[3]
A QFreeList's MaxIndex is clearly meant to be the sum of its Sizes;
but the parentheses in MaxIndex - (16 - 128 - 1024) doesn't give the
same as without the parentheses. Noticed while reviewing a copy of
this code now used by QReadWriteLock (which has this fix).
Change-Id: I9f68171475b3c6edc18896056b5532183fee92b2
Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
Reviewed-by: Olivier Goffart (Woboq GmbH) <ogoffart@woboq.com>
Diffstat (limited to 'src/corelib')
-rw-r--r-- | src/corelib/thread/qmutex.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/corelib/thread/qmutex.cpp b/src/corelib/thread/qmutex.cpp index 7e3610f0b3..3e7033451e 100644 --- a/src/corelib/thread/qmutex.cpp +++ b/src/corelib/thread/qmutex.cpp @@ -642,7 +642,7 @@ const int FreeListConstants::Sizes[FreeListConstants::BlockCount] = { 16, 128, 1024, - FreeListConstants::MaxIndex - (16-128-1024) + FreeListConstants::MaxIndex - (16 + 128 + 1024) }; typedef QFreeList<QMutexPrivate, FreeListConstants> FreeList; |