summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorStephan Bergmann <sbergman@redhat.com>2014-01-29 11:05:15 +0100
committerStephan Bergmann <sbergman@redhat.com>2014-01-29 11:08:32 +0100
commit9038a3ef7c10aff868636715924cb9f97d648d80 (patch)
treeeb3ae7f1cb997bf908d6e350a357fcb05f5d36c5
parent612dac063a144506b44f4ab2afa2c5cdf9d882b4 (diff)
cppuhelper: 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: Ibed63566266328f84432ad2019e58265d9d30fc3
-rw-r--r--include/cppuhelper/interfacecontainer.h6
-rw-r--r--include/cppuhelper/typeprovider.hxx2
-rw-r--r--include/cppuhelper/weakref.hxx2
3 files changed, 5 insertions, 5 deletions
diff --git a/include/cppuhelper/interfacecontainer.h b/include/cppuhelper/interfacecontainer.h
index 860529db3f8a..dd3f6a9fc73d 100644
--- a/include/cppuhelper/interfacecontainer.h
+++ b/include/cppuhelper/interfacecontainer.h
@@ -79,11 +79,11 @@ public:
*/
~OInterfaceIteratorHelper() SAL_THROW(());
- /** Return sal_True, if there are more elements in the iterator. */
- sal_Bool SAL_CALL hasMoreElements() const SAL_THROW(())
+ /** Return true, if there are more elements in the iterator. */
+ bool SAL_CALL hasMoreElements() const SAL_THROW(())
{ return nRemain != 0; }
/** Return the next element of the iterator. Calling this method if
- hasMoreElements() has returned sal_False, is an error. Cast the
+ hasMoreElements() has returned false, is an error. Cast the
returned pointer to the
*/
::com::sun::star::uno::XInterface * SAL_CALL next() SAL_THROW(());
diff --git a/include/cppuhelper/typeprovider.hxx b/include/cppuhelper/typeprovider.hxx
index c9f864dce0f3..b617483bbe8e 100644
--- a/include/cppuhelper/typeprovider.hxx
+++ b/include/cppuhelper/typeprovider.hxx
@@ -204,7 +204,7 @@ public:
@param bUseEthernetAddress whether an ethernet mac address should be taken into account
*/
- inline OImplementationId( sal_Bool bUseEthernetAddress = sal_True ) SAL_THROW(())
+ inline OImplementationId( bool bUseEthernetAddress = true ) SAL_THROW(())
: _pSeq( 0 )
, _bUseEthernetAddress( bUseEthernetAddress )
{}
diff --git a/include/cppuhelper/weakref.hxx b/include/cppuhelper/weakref.hxx
index d9a77287b364..849196ab1074 100644
--- a/include/cppuhelper/weakref.hxx
+++ b/include/cppuhelper/weakref.hxx
@@ -83,7 +83,7 @@ public:
@param rObj another weak ref
@return true, if both weak refs reference to the same object.
*/
- inline sal_Bool SAL_CALL operator == ( const WeakReferenceHelper & rObj ) const SAL_THROW(())
+ inline bool SAL_CALL operator == ( const WeakReferenceHelper & rObj ) const SAL_THROW(())
{ return (get() == rObj.get()); }
/** Gets a hard reference to the object.