QReadWriteLock: make field 'recursive' const

It is never written after initialization, and accessed concurrently
outside mutex protection, so make sure that it never changes by
marking it as const.

Change-Id: Ib28b2e8b3067d596a95d1699165a6ebfb15fe674
Reviewed-by: David Faure <david.faure@kdab.com>
Reviewed-by: Olivier Goffart (Woboq GmbH) <ogoffart@woboq.com>
This commit is contained in:
Marc Mutz 2017-02-16 11:42:14 +01:00
parent f05d2764b0
commit 0f730ef7b6

View File

@ -74,7 +74,7 @@ public:
int writerCount; int writerCount;
int waitingReaders; int waitingReaders;
int waitingWriters; int waitingWriters;
bool recursive; const bool recursive;
//Called with the mutex locked //Called with the mutex locked
bool lockForWrite(int timeout); bool lockForWrite(int timeout);