summaryrefslogtreecommitdiff
path: root/include/salhelper
diff options
context:
space:
mode:
authorStephan Bergmann <sbergman@redhat.com>2014-01-28 13:16:14 +0100
committerStephan Bergmann <sbergman@redhat.com>2014-01-28 15:54:49 +0100
commit8f408fd559a8843b9a0f5a5d40223485e3a9deab (patch)
tree8e49f57708d5c5a433f3a5056091e546dcc297ed /include/salhelper
parente2e5b7499330f75dc5fb6e42c96555cbd15ed807 (diff)
salhelper: 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: I2c7779ad07daa77ae06709c1f6512f2fa25fcd36
Diffstat (limited to 'include/salhelper')
-rw-r--r--include/salhelper/dynload.hxx2
-rw-r--r--include/salhelper/timer.hxx16
2 files changed, 9 insertions, 9 deletions
diff --git a/include/salhelper/dynload.hxx b/include/salhelper/dynload.hxx
index 826a217c0649..35eb81159558 100644
--- a/include/salhelper/dynload.hxx
+++ b/include/salhelper/dynload.hxx
@@ -182,7 +182,7 @@ public:
}
/// checks if the loader works on a loaded and initialized library.
- sal_Bool SAL_CALL isLoaded() const SAL_THROW(())
+ bool SAL_CALL isLoaded() const SAL_THROW(())
{
return (m_pLoader != NULL);
}
diff --git a/include/salhelper/timer.hxx b/include/salhelper/timer.hxx
index 8043e8381eff..1b52522dea99 100644
--- a/include/salhelper/timer.hxx
+++ b/include/salhelper/timer.hxx
@@ -89,33 +89,33 @@ struct TTimeValue : public TimeValue
normalize();
}
- sal_Bool SAL_CALL isEmpty() const
+ bool SAL_CALL isEmpty() const
{
return ( ( Seconds == 0 ) && ( Nanosec == 0 ) );
}
};
-inline sal_Bool operator<( const TTimeValue& rTimeA, const TTimeValue& rTimeB )
+inline bool operator<( const TTimeValue& rTimeA, const TTimeValue& rTimeB )
{
if ( rTimeA.Seconds < rTimeB.Seconds )
- return sal_True;
+ return true;
else if ( rTimeA.Seconds > rTimeB.Seconds )
- return sal_False;
+ return false;
else
return ( rTimeA.Nanosec < rTimeB.Nanosec );
}
-inline sal_Bool operator>( const TTimeValue& rTimeA, const TTimeValue& rTimeB )
+inline bool operator>( const TTimeValue& rTimeA, const TTimeValue& rTimeB )
{
if ( rTimeA.Seconds > rTimeB.Seconds )
- return sal_True;
+ return true;
else if ( rTimeA.Seconds < rTimeB.Seconds )
- return sal_False;
+ return false;
else
return ( rTimeA.Nanosec > rTimeB.Nanosec );
}
-inline sal_Bool operator==( const TTimeValue& rTimeA, const TTimeValue& rTimeB )
+inline bool operator==( const TTimeValue& rTimeA, const TTimeValue& rTimeB )
{
return ( ( rTimeA.Seconds == rTimeB.Seconds ) &&
( rTimeA.Nanosec == rTimeB.Nanosec ) );