summaryrefslogtreecommitdiffstats
path: root/src/corelib/thread/qreadwritelock.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/corelib/thread/qreadwritelock.cpp')
-rw-r--r--src/corelib/thread/qreadwritelock.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/corelib/thread/qreadwritelock.cpp b/src/corelib/thread/qreadwritelock.cpp
index bd07a97..1a9eb0b 100644
--- a/src/corelib/thread/qreadwritelock.cpp
+++ b/src/corelib/thread/qreadwritelock.cpp
@@ -252,7 +252,7 @@ bool QReadWriteLock::tryLockForRead(int timeout)
while (d->accessCount < 0 || d->waitingWriters) {
++d->waitingReaders;
- bool success = d->readerWait.wait(&d->mutex, timeout < 0 ? ULONG_MAX : timeout);
+ bool success = d->readerWait.wait(&d->mutex, timeout < 0 ? ULONG_MAX : ulong(timeout));
--d->waitingReaders;
if (!success)
return false;
@@ -374,7 +374,7 @@ bool QReadWriteLock::tryLockForWrite(int timeout)
while (d->accessCount != 0) {
++d->waitingWriters;
- bool success = d->writerWait.wait(&d->mutex, timeout < 0 ? ULONG_MAX : timeout);
+ bool success = d->writerWait.wait(&d->mutex, timeout < 0 ? ULONG_MAX : ulong(timeout));
--d->waitingWriters;
if (!success)