summaryrefslogtreecommitdiff
path: root/include/com/sun/star/uno/Reference.hxx
diff options
context:
space:
mode:
authorStephan Bergmann <sbergman@redhat.com>2014-01-22 11:34:29 +0100
committerStephan Bergmann <sbergman@redhat.com>2014-01-22 11:39:22 +0100
commit83d51e244d450df0f896758966f633c90cc4c483 (patch)
tree3df8f82eeb7a0892a55b039c1bb6c84710b526ee /include/com/sun/star/uno/Reference.hxx
parent7cb3e55bf03c49608e2b54b5d90eddd423a0f891 (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: Ife614637082036dd17412f247be79233326c4f0b
Diffstat (limited to 'include/com/sun/star/uno/Reference.hxx')
-rw-r--r--include/com/sun/star/uno/Reference.hxx30
1 files changed, 15 insertions, 15 deletions
diff --git a/include/com/sun/star/uno/Reference.hxx b/include/com/sun/star/uno/Reference.hxx
index 9726860b2eca..1e6a13bfa66b 100644
--- a/include/com/sun/star/uno/Reference.hxx
+++ b/include/com/sun/star/uno/Reference.hxx
@@ -215,7 +215,7 @@ inline void Reference< interface_type >::clear() SAL_THROW(())
}
//__________________________________________________________________________________________________
template< class interface_type >
-inline sal_Bool Reference< interface_type >::set(
+inline bool Reference< interface_type >::set(
interface_type * pInterface ) SAL_THROW(())
{
if (pInterface)
@@ -228,7 +228,7 @@ inline sal_Bool Reference< interface_type >::set(
}
//__________________________________________________________________________________________________
template< class interface_type >
-inline sal_Bool Reference< interface_type >::set(
+inline bool Reference< interface_type >::set(
interface_type * pInterface, __sal_NoAcquire ) SAL_THROW(())
{
XInterface * const pOld = _pInterface;
@@ -239,7 +239,7 @@ inline sal_Bool Reference< interface_type >::set(
}
//__________________________________________________________________________________________________
template< class interface_type >
-inline sal_Bool Reference< interface_type >::set(
+inline bool Reference< interface_type >::set(
interface_type * pInterface, UnoReference_NoAcquire ) SAL_THROW(())
{
return set( pInterface, SAL_NO_ACQUIRE );
@@ -247,21 +247,21 @@ inline sal_Bool Reference< interface_type >::set(
//__________________________________________________________________________________________________
template< class interface_type >
-inline sal_Bool Reference< interface_type >::set(
+inline bool Reference< interface_type >::set(
const Reference< interface_type > & rRef ) SAL_THROW(())
{
return set( castFromXInterface( rRef._pInterface ) );
}
//__________________________________________________________________________________________________
template< class interface_type >
-inline sal_Bool Reference< interface_type >::set(
+inline bool Reference< interface_type >::set(
XInterface * pInterface, UnoReference_Query ) SAL_THROW( (RuntimeException) )
{
return set( castFromXInterface(iquery( pInterface )), SAL_NO_ACQUIRE );
}
//__________________________________________________________________________________________________
template< class interface_type >
-inline sal_Bool Reference< interface_type >::set(
+inline bool Reference< interface_type >::set(
const BaseReference & rRef, UnoReference_Query ) SAL_THROW( (RuntimeException) )
{
return set( castFromXInterface(iquery( rRef.get() )), SAL_NO_ACQUIRE );
@@ -358,10 +358,10 @@ inline Reference< interface_type > Reference< interface_type >::query(
//##################################################################################################
//__________________________________________________________________________________________________
-inline sal_Bool BaseReference::operator == ( XInterface * pInterface ) const SAL_THROW(())
+inline bool BaseReference::operator == ( XInterface * pInterface ) const SAL_THROW(())
{
if (_pInterface == pInterface)
- return sal_True;
+ return true;
try
{
// only the query to XInterface must return the same pointer if they belong to same objects
@@ -371,16 +371,16 @@ inline sal_Bool BaseReference::operator == ( XInterface * pInterface ) const SAL
}
catch (RuntimeException &)
{
- return sal_False;
+ return false;
}
}
//______________________________________________________________________________
-inline sal_Bool BaseReference::operator < (
+inline bool BaseReference::operator < (
const BaseReference & rRef ) const SAL_THROW(())
{
if (_pInterface == rRef._pInterface)
- return sal_False;
+ return false;
try
{
// only the query to XInterface must return the same pointer:
@@ -390,22 +390,22 @@ inline sal_Bool BaseReference::operator < (
}
catch (RuntimeException &)
{
- return sal_False;
+ return false;
}
}
//__________________________________________________________________________________________________
-inline sal_Bool BaseReference::operator != ( XInterface * pInterface ) const SAL_THROW(())
+inline bool BaseReference::operator != ( XInterface * pInterface ) const SAL_THROW(())
{
return (! operator == ( pInterface ));
}
//__________________________________________________________________________________________________
-inline sal_Bool BaseReference::operator == ( const BaseReference & rRef ) const SAL_THROW(())
+inline bool BaseReference::operator == ( const BaseReference & rRef ) const SAL_THROW(())
{
return operator == ( rRef._pInterface );
}
//__________________________________________________________________________________________________
-inline sal_Bool BaseReference::operator != ( const BaseReference & rRef ) const SAL_THROW(())
+inline bool BaseReference::operator != ( const BaseReference & rRef ) const SAL_THROW(())
{
return (! operator == ( rRef._pInterface ));
}