summaryrefslogtreecommitdiff
path: root/include/osl/thread.hxx
diff options
context:
space:
mode:
authorStephan Bergmann <sbergman@redhat.com>2014-01-27 10:45:55 +0100
committerStephan Bergmann <sbergman@redhat.com>2014-01-27 10:47:33 +0100
commite344d2ac328332aeb0e326636a0a2cd61b812b6a (patch)
tree5563c5639c13810850253186cfd91aaf94488a57 /include/osl/thread.hxx
parent65191cda819ee8f4d14f6cdf12568c35e46b5c66 (diff)
Let C++ inline functions return bool instead of sal_Bool
...to improve diagnosing misuses of boolean expressions in client code (cf. compilerplugins/clang/implicitboolconversion.cxx). This change should be transparent to client code. Change-Id: Ibf43c5ded609b489952e1cc666cac1e72ffa2386
Diffstat (limited to 'include/osl/thread.hxx')
-rw-r--r--include/osl/thread.hxx14
1 files changed, 7 insertions, 7 deletions
diff --git a/include/osl/thread.hxx b/include/osl/thread.hxx
index 2f91b29afa8c..398eca170f2f 100644
--- a/include/osl/thread.hxx
+++ b/include/osl/thread.hxx
@@ -69,7 +69,7 @@ public:
osl_destroyThread( m_hThread);
}
- sal_Bool SAL_CALL create()
+ bool SAL_CALL create()
{
assert(m_hThread == 0); // only one running thread per instance
m_hThread = osl_createSuspendedThread( threadFunc, (void*)this);
@@ -81,11 +81,11 @@ public:
return true;
}
- sal_Bool SAL_CALL createSuspended()
+ bool SAL_CALL createSuspended()
{
assert(m_hThread == 0); // only one running thread per instance
if( m_hThread)
- return sal_False;
+ return false;
m_hThread= osl_createSuspendedThread( threadFunc,
(void*)this);
return m_hThread != 0;
@@ -114,7 +114,7 @@ public:
osl_joinWithThread(m_hThread);
}
- sal_Bool SAL_CALL isRunning() const
+ bool SAL_CALL isRunning() const
{
return osl_isThreadRunning(m_hThread);
}
@@ -154,9 +154,9 @@ public:
osl_setThreadName(name);
}
- virtual sal_Bool SAL_CALL schedule()
+ virtual bool SAL_CALL schedule()
{
- return m_hThread ? osl_scheduleThread(m_hThread) : sal_False;
+ return m_hThread && osl_scheduleThread(m_hThread);
}
SAL_CALL operator oslThread() const
@@ -208,7 +208,7 @@ public:
/** Set the data associated with the data key.
@returns True if operation was successful
*/
- sal_Bool SAL_CALL setData(void *pData)
+ bool SAL_CALL setData(void *pData)
{
return (osl_setThreadKeyData(m_hKey, pData));
}