qthreadpool: use const methods more

Change-Id: I16c017e5ff89075aa8faabcc8540d3bd10c80d45
Reviewed-by: Giuseppe D'Angelo <giuseppe.dangelo@kdab.com>
bb10
Anton Kudryavtsev 2023-09-07 14:45:18 +03:00
parent 03d62322b2
commit 003aa16e92
1 changed files with 2 additions and 2 deletions

View File

@ -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;