summaryrefslogtreecommitdiff
path: root/sal
diff options
context:
space:
mode:
authorNoel Grandin <noel@peralex.com>2016-03-14 13:41:38 +0200
committerNoel Grandin <noel@peralex.com>2016-03-15 08:27:25 +0200
commitb47cb646ff2a62fcd3fac0e453a7261bbaefbcb7 (patch)
tree49a2dc78e998baa77212776d7d94fb8d72dc0f00 /sal
parent89e0663c55f7f1763536a345d63111115c71ef26 (diff)
loplugin:constantparam
Change-Id: I270e068b3c83e966e741b0a072fecce9d92d53f5
Diffstat (limited to 'sal')
-rw-r--r--sal/qa/osl/process/osl_Thread.cxx12
1 files changed, 6 insertions, 6 deletions
diff --git a/sal/qa/osl/process/osl_Thread.cxx b/sal/qa/osl/process/osl_Thread.cxx
index 28080b41b52f..653f14486e47 100644
--- a/sal/qa/osl/process/osl_Thread.cxx
+++ b/sal/qa/osl/process/osl_Thread.cxx
@@ -167,11 +167,11 @@ public:
osl::MutexGuard g(m_aMutex);
return m_nFlag;
}
- void addValue(T n)
+ void incValue()
{
//only one thread operate on the flag.
osl::MutexGuard g(m_aMutex);
- m_nFlag += n;
+ m_nFlag++;
}
void acquire() {m_aMutex.acquire();}
void release() {m_aMutex.release();}
@@ -239,7 +239,7 @@ protected:
{
while(schedule())
{
- m_aFlag.addValue(1);
+ m_aFlag.incValue();
ThreadHelper::thread_sleep_tenth_sec(1);
}
}
@@ -298,7 +298,7 @@ protected:
/// if the thread should terminate, schedule return false
while (m_aFlag.getValue() < 20 && schedule())
{
- m_aFlag.addValue(1);
+ m_aFlag.incValue();
ThreadHelper::thread_sleep_tenth_sec(1);
if (m_nWaitSec != 0)
@@ -346,7 +346,7 @@ protected:
{
while (m_aFlag.getValue() < 10)
{
- m_aFlag.addValue(1);
+ m_aFlag.incValue();
ThreadHelper::thread_sleep_tenth_sec(1);
}
}
@@ -391,7 +391,7 @@ protected:
//if the thread should terminate, schedule return false
while (schedule())
{
- m_aFlag.addValue(1);
+ m_aFlag.incValue();
}
}
void SAL_CALL onTerminated() override