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>
This commit is contained in:
Edward Welbourne 2017-06-01 15:36:38 +02:00
parent 2ea90c56f2
commit d3e73b4f6b

View File

@ -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;