From fcf996f893ffd955ed56ea71e2ad7cf0194bb505 Mon Sep 17 00:00:00 2001 From: Stephan Bergmann Date: Tue, 28 Jan 2014 13:44:24 +0100 Subject: uno: 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: Id4f3c7159c5cfac56dd9edf4d1a43e36eed39fec --- include/uno/environment.hxx | 2 +- include/uno/mapping.hxx | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/include/uno/environment.hxx b/include/uno/environment.hxx index 0f4d15bdf66d..1eb5a2e46fb8 100644 --- a/include/uno/environment.hxx +++ b/include/uno/environment.hxx @@ -133,7 +133,7 @@ public: @return true, if a environment is set, false otherwise */ - inline sal_Bool SAL_CALL is() const SAL_THROW(()) + inline bool SAL_CALL is() const SAL_THROW(()) { return (_pEnv != 0); } /** Releases a set environment. diff --git a/include/uno/mapping.hxx b/include/uno/mapping.hxx index f8828170b955..c5621291cd18 100644 --- a/include/uno/mapping.hxx +++ b/include/uno/mapping.hxx @@ -138,7 +138,7 @@ public: @return true if a mapping is set */ - inline sal_Bool SAL_CALL is() const SAL_THROW(()) + inline bool SAL_CALL is() const SAL_THROW(()) { return (_pMapping != 0); } /** Releases a set mapping. @@ -303,7 +303,7 @@ inline void * Mapping::mapInterface( @deprecated */ template< class C > -inline sal_Bool mapToCpp( Reference< C > * ppRet, uno_Interface * pUnoI ) SAL_THROW(()) +inline bool mapToCpp( Reference< C > * ppRet, uno_Interface * pUnoI ) SAL_THROW(()) { Mapping aMapping( ::rtl::OUString( UNO_LB_UNO ), @@ -326,7 +326,7 @@ inline sal_Bool mapToCpp( Reference< C > * ppRet, uno_Interface * pUnoI ) SAL_TH @deprecated */ template< class C > -inline sal_Bool mapToUno( uno_Interface ** ppRet, const Reference< C > & x ) SAL_THROW(()) +inline bool mapToUno( uno_Interface ** ppRet, const Reference< C > & x ) SAL_THROW(()) { Mapping aMapping( ::rtl::OUString( CPPU_CURRENT_LANGUAGE_BINDING_NAME ), -- cgit