summaryrefslogtreecommitdiff
path: root/cli_ure/source
diff options
context:
space:
mode:
authorNoel Grandin <noel@peralex.com>2014-05-02 15:42:25 +0200
committerNoel Grandin <noel@peralex.com>2014-05-05 12:47:48 +0200
commit4f9b21248ffdf55cef9f3f9d1da76778ee000775 (patch)
treeb059d288339a68aa4c3901f1100e99b04d05a23d /cli_ure/source
parentb4107411900f5bb4c215e2d9db09fc2b2b82939b (diff)
simplify ternary conditions "xxx ? yyy : false"
Look for code like: xxx ? yyy : false; Which can be simplified to: xxx && yyy Change-Id: Ia33c0e452aa28af3f0658a5382895aaad0246b4d
Diffstat (limited to 'cli_ure/source')
-rw-r--r--cli_ure/source/uno_bridge/cli_data.cxx8
1 files changed, 4 insertions, 4 deletions
diff --git a/cli_ure/source/uno_bridge/cli_data.cxx b/cli_ure/source/uno_bridge/cli_data.cxx
index 219438a2fb66..a5e2f38eab87 100644
--- a/cli_ure/source/uno_bridge/cli_data.cxx
+++ b/cli_ure/source/uno_bridge/cli_data.cxx
@@ -1103,11 +1103,11 @@ void Bridge::map_to_uno(void * uno_data, System::Object^ cli_data,
void * p = (char *) uno_data + comp_td->pMemberOffsets[ nPos ];
//When using polymorphic structs then the parameterized members can be null.
//Then we set a default value.
- bool bDefault = ((struct_td != NULL
+ bool bDefault = (struct_td != NULL
&& struct_td->pParameterizedTypes != NULL
&& struct_td->pParameterizedTypes[nPos] == sal_True
- && val == nullptr)
- || cli_data == nullptr) ? true : false;
+ && val == nullptr)
+ || cli_data == nullptr;
switch (member_type->eTypeClass)
{
case typelib_TypeClass_CHAR:
@@ -1504,7 +1504,7 @@ void Bridge::map_to_cli(
*cli_data= *(__wchar_t const*)uno_data;
break;
case typelib_TypeClass_BOOLEAN:
- *cli_data = (*(bool const*)uno_data) == sal_True ? true : false;
+ *cli_data = (*(bool const*)uno_data) == sal_True;
break;
case typelib_TypeClass_BYTE:
*cli_data = *(unsigned char const*) uno_data;