summaryrefslogtreecommitdiff
path: root/comphelper
diff options
context:
space:
mode:
authorStephan Bergmann <sbergman@redhat.com>2016-11-29 17:21:47 +0100
committerStephan Bergmann <sbergman@redhat.com>2016-11-29 17:21:47 +0100
commitf8e3e523e27e0a3838c292a560cf6dba9d20d267 (patch)
treee0977f4c00760a99e7267ceab5196fda4c9a714a /comphelper
parent7222ffb79c9886d36b4c0740a51c1c94e763d178 (diff)
Rewrite some (trivial) assignments inside if/while conditions: comphelper
Change-Id: I8361f62199f45dbced45e5d4a4d5eeddf1c42d67
Diffstat (limited to 'comphelper')
-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();