summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--comphelper/source/misc/threadpool.cxx9
1 files changed, 3 insertions, 6 deletions
diff --git a/comphelper/source/misc/threadpool.cxx b/comphelper/source/misc/threadpool.cxx
index f399274eed24..346c1712b270 100644
--- a/comphelper/source/misc/threadpool.cxx
+++ b/comphelper/source/misc/threadpool.cxx
@@ -57,8 +57,7 @@ public:
#if defined DBG_UTIL && defined LINUX
gbIsWorkerThread = true;
#endif
- ThreadTask *pTask;
- while ( ( pTask = waitForWork() ) )
+ while ( ThreadTask * pTask = waitForWork() )
{
std::shared_ptr<ThreadTaskTag> pTag(pTask->getTag());
try {
@@ -189,8 +188,7 @@ void ThreadPool::waitAndCleanupWorkers()
if( maWorkers.empty() )
{ // no threads at all -> execute the work in-line
- ThreadTask *pTask;
- while ( ( pTask = popWork() ) )
+ while ( ThreadTask * pTask = popWork() )
{
std::shared_ptr<ThreadTaskTag> pTag(pTask->getTag());
pTask->doWork();
@@ -269,8 +267,7 @@ void ThreadPool::waitUntilDone(const std::shared_ptr<ThreadTaskTag>& rTag)
if( maWorkers.empty() )
{ // no threads at all -> execute the work in-line
- ThreadTask *pTask;
- while ( ( pTask = popWork() ) )
+ while ( ThreadTask * pTask = popWork() )
{
std::shared_ptr<ThreadTaskTag> pTag(pTask->getTag());
pTask->doWork();