diff options
author | Noel Grandin <noel.grandin@collabora.co.uk> | 2020-04-14 14:55:22 +0200 |
---|---|---|
committer | Noel Grandin <noel.grandin@collabora.co.uk> | 2020-04-14 16:35:38 +0200 |
commit | 11785217594d863efb518aa8b8f2910cdcb9c59d (patch) | |
tree | d8460fe0e3a9ee4212d7bd964c2fd3ee0d9074b4 /comphelper | |
parent | 14471a694271777440c19916055d659337c0fb8d (diff) |
loplugin:buriedassign in c*
Change-Id: Id14fed7e5c0f588ad3c927f12251432d12c1a7c8
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/92190
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'comphelper')
-rw-r--r-- | comphelper/source/misc/threadpool.cxx | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/comphelper/source/misc/threadpool.cxx b/comphelper/source/misc/threadpool.cxx index 9dfbff0e2900..f93400d96f9f 100644 --- a/comphelper/source/misc/threadpool.cxx +++ b/comphelper/source/misc/threadpool.cxx @@ -240,10 +240,13 @@ void ThreadPool::waitUntilDone(const std::shared_ptr<ThreadTaskTag>& rTag, bool if( maWorkers.empty() ) { // no threads at all -> execute the work in-line - std::unique_ptr<ThreadTask> pTask; - while (!rTag->isDone() && - ( pTask = popWorkLocked(aGuard, false) ) ) + while (!rTag->isDone()) + { + std::unique_ptr<ThreadTask> pTask = popWorkLocked(aGuard, false); + if (!pTask) + break; pTask->exec(); + } } } |