summaryrefslogtreecommitdiff
path: root/include/com
diff options
context:
space:
mode:
authorStephan Bergmann <sbergman@redhat.com>2016-04-20 16:45:17 +0200
committerStephan Bergmann <sbergman@redhat.com>2016-04-20 17:25:31 +0200
commita3858ed3a785507e7ed9c02cb1e145d2a4c4659b (patch)
tree9a39201f1fca556327aebde1400247a58adf104e /include/com
parent12a4f93d1d412d58b1b13d814de589b10aa41e01 (diff)
Use cast to bool to normalize sal_Bool values
Change-Id: I8a886f752d2a16ec4c10656bcd0b3631647971b2
Diffstat (limited to 'include/com')
-rw-r--r--include/com/sun/star/uno/Any.hxx10
1 files changed, 4 insertions, 6 deletions
diff --git a/include/com/sun/star/uno/Any.hxx b/include/com/sun/star/uno/Any.hxx
index 79f0cdbbe4f2..cbd8fb6e287e 100644
--- a/include/com/sun/star/uno/Any.hxx
+++ b/include/com/sun/star/uno/Any.hxx
@@ -260,7 +260,7 @@ inline bool SAL_CALL operator >>= ( const ::com::sun::star::uno::Any & rAny, sal
{
if (typelib_TypeClass_BOOLEAN == rAny.pType->eTypeClass)
{
- value = (* static_cast< const sal_Bool * >( rAny.pData ) != sal_False);
+ value = bool(* static_cast< const sal_Bool * >( rAny.pData ));
return true;
}
return false;
@@ -270,7 +270,7 @@ template<>
inline bool SAL_CALL operator == ( const Any & rAny, const sal_Bool & value )
{
return (typelib_TypeClass_BOOLEAN == rAny.pType->eTypeClass &&
- (value != sal_False) == (* static_cast< const sal_Bool * >( rAny.pData ) != sal_False));
+ bool(value) == bool(* static_cast< const sal_Bool * >( rAny.pData )));
}
@@ -279,8 +279,7 @@ inline bool SAL_CALL operator >>= ( Any const & rAny, bool & value )
{
if (rAny.pType->eTypeClass == typelib_TypeClass_BOOLEAN)
{
- value = *static_cast< sal_Bool const * >(
- rAny.pData ) != sal_False;
+ value = *static_cast< sal_Bool const * >( rAny.pData );
return true;
}
return false;
@@ -292,8 +291,7 @@ inline bool SAL_CALL operator == ( Any const & rAny, bool const & value )
{
return (rAny.pType->eTypeClass == typelib_TypeClass_BOOLEAN &&
(value ==
- (*static_cast< sal_Bool const * >( rAny.pData )
- != sal_False)));
+ bool(*static_cast< sal_Bool const * >( rAny.pData ))));
}
// byte