diff options
Diffstat (limited to 'src/corelib/thread/qwaitcondition_win.cpp')
-rw-r--r-- | src/corelib/thread/qwaitcondition_win.cpp | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/src/corelib/thread/qwaitcondition_win.cpp b/src/corelib/thread/qwaitcondition_win.cpp index 534456a935..a6ad95b397 100644 --- a/src/corelib/thread/qwaitcondition_win.cpp +++ b/src/corelib/thread/qwaitcondition_win.cpp @@ -223,8 +223,7 @@ void QWaitCondition::wakeOne() { // wake up the first waiting thread in the queue QMutexLocker locker(&d->mtx); - for (int i = 0; i < d->queue.size(); ++i) { - QWaitConditionEvent *current = d->queue.at(i); + for (QWaitConditionEvent *current : qAsConst(d->queue)) { if (current->wokenUp) continue; SetEvent(current->event); @@ -237,8 +236,7 @@ void QWaitCondition::wakeAll() { // wake up the all threads in the queue QMutexLocker locker(&d->mtx); - for (int i = 0; i < d->queue.size(); ++i) { - QWaitConditionEvent *current = d->queue.at(i); + for (QWaitConditionEvent *current : qAsConst(d->queue)) { SetEvent(current->event); current->wokenUp = true; } |