diff options
author | Stephan Bergmann <sbergman@redhat.com> | 2014-01-28 13:44:24 +0100 |
---|---|---|
committer | Stephan Bergmann <sbergman@redhat.com> | 2014-01-28 15:54:49 +0100 |
commit | fcf996f893ffd955ed56ea71e2ad7cf0194bb505 (patch) | |
tree | b31f4ff7a4b91ae9b5bb0325aa895288c4a23d4e | |
parent | 8f408fd559a8843b9a0f5a5d40223485e3a9deab (diff) |
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
-rw-r--r-- | include/uno/environment.hxx | 2 | ||||
-rw-r--r-- | 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 ), |