diff options
| author | Anton Kudryavtsev <anton.kudryavtsev@vk.team> | 2023-09-07 14:45:18 +0300 |
|---|---|---|
| committer | Anton Kudryavtsev <anton.kudryavtsev@vk.team> | 2023-09-08 12:32:44 +0300 |
| commit | 003aa16e92c74560315a9b897b0c3feca6c08a58 (patch) | |
| tree | e95a22d4aa24c11f22d61adea22967768cc66e4f /src/corelib/thread/qthreadpool.cpp | |
| parent | 03d62322b239772e0440cee9ce7576147239f339 (diff) | |
qthreadpool: use const methods more
Change-Id: I16c017e5ff89075aa8faabcc8540d3bd10c80d45
Reviewed-by: Giuseppe D'Angelo <giuseppe.dangelo@kdab.com>
Diffstat (limited to 'src/corelib/thread/qthreadpool.cpp')
| -rw-r--r-- | src/corelib/thread/qthreadpool.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/corelib/thread/qthreadpool.cpp b/src/corelib/thread/qthreadpool.cpp index fb7ef030601..c96452a6707 100644 --- a/src/corelib/thread/qthreadpool.cpp +++ b/src/corelib/thread/qthreadpool.cpp @@ -87,7 +87,7 @@ void QThreadPoolThread::run() if (manager->queue.isEmpty()) break; - QueuePage *page = manager->queue.first(); + QueuePage *page = manager->queue.constFirst(); r = page->pop(); if (page->isFinished()) { @@ -210,7 +210,7 @@ void QThreadPoolPrivate::tryToStartMoreThreads() { // try to push tasks on the queue to any available threads while (!queue.isEmpty()) { - QueuePage *page = queue.first(); + QueuePage *page = queue.constFirst(); if (!tryStart(page->first())) break; |
