summaryrefslogtreecommitdiff
path: root/include/salhelper/timer.hxx
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/timer.hxx
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/timer.hxx')
-rw-r--r--include/salhelper/timer.hxx16
1 files changed, 8 insertions, 8 deletions
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 ) );