diff options
author | Marc Mutz <marc.mutz@kdab.com> | 2017-02-16 11:42:14 +0100 |
---|---|---|
committer | Marc Mutz <marc.mutz@kdab.com> | 2017-02-16 14:34:22 +0000 |
commit | 0f730ef7b6cc9571147e779183b317547011526b (patch) | |
tree | 76b2bd640f1b810846e69f9be77e325010f87008 /src/corelib/thread/qreadwritelock_p.h | |
parent | f05d2764b0c5a1b55c7856984017254b55bfc7e3 (diff) |
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>
Diffstat (limited to 'src/corelib/thread/qreadwritelock_p.h')
-rw-r--r-- | src/corelib/thread/qreadwritelock_p.h | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/corelib/thread/qreadwritelock_p.h b/src/corelib/thread/qreadwritelock_p.h index bb58dfab56..04dd45a2e1 100644 --- a/src/corelib/thread/qreadwritelock_p.h +++ b/src/corelib/thread/qreadwritelock_p.h @@ -74,7 +74,7 @@ public: int writerCount; int waitingReaders; int waitingWriters; - bool recursive; + const bool recursive; //Called with the mutex locked bool lockForWrite(int timeout); |