summaryrefslogtreecommitdiff
path: root/idlc
diff options
context:
space:
mode:
Diffstat (limited to 'idlc')
-rw-r--r--idlc/inc/idlc/astexpression.hxx2
-rw-r--r--idlc/source/astexpression.cxx24
-rw-r--r--idlc/source/parser.y2
3 files changed, 14 insertions, 14 deletions
diff --git a/idlc/inc/idlc/astexpression.hxx b/idlc/inc/idlc/astexpression.hxx
index 865eeb2cddc5..80b4ea02786d 100644
--- a/idlc/inc/idlc/astexpression.hxx
+++ b/idlc/inc/idlc/astexpression.hxx
@@ -81,7 +81,7 @@ struct AstExprValue
sal_uInt32 ulval; // Contains unsigned long expr value
sal_Int64 hval; // Contains hyper expression value
sal_uInt64 uhval; // Contains unsigned hyper expr value
- sal_Bool bval; // Contains boolean expression value
+ bool bval; // Contains boolean expression value
float fval; // Contains 32-bit float expr value
double dval; // Contains 64-bit float expr value
sal_uInt32 eval; // Contains enumeration value
diff --git a/idlc/source/astexpression.cxx b/idlc/source/astexpression.cxx
index 6b9e010ecf3e..783ee6643dda 100644
--- a/idlc/source/astexpression.cxx
+++ b/idlc/source/astexpression.cxx
@@ -490,41 +490,41 @@ coerce_value(AstExprValue *ev, ExprType t)
switch (ev->et)
{
case ET_short:
- ev->u.bval = (ev->u.sval == 0) ? sal_False : sal_True;
+ ev->u.bval = ev->u.sval != 0;
ev->et = ET_boolean;
return ev;
case ET_ushort:
- ev->u.bval = (ev->u.usval == 0) ? sal_False : sal_True;
+ ev->u.bval = ev->u.usval != 0;
ev->et = ET_boolean;
return ev;
case ET_long:
- ev->u.bval = (ev->u.lval == 0) ? sal_False : sal_True;
+ ev->u.bval = ev->u.lval != 0;
ev->et = ET_boolean;
return ev;
case ET_ulong:
- ev->u.bval = (ev->u.ulval == 0) ? sal_False : sal_True;
+ ev->u.bval = ev->u.ulval != 0;
ev->et = ET_boolean;
return ev;
case ET_hyper:
- ev->u.bval = (ev->u.hval == 0) ? sal_False : sal_True;
+ ev->u.bval = ev->u.hval != 0;
ev->et = ET_boolean;
return ev;
case ET_uhyper:
- ev->u.bval = (ev->u.uhval == 0) ? sal_False : sal_True;
+ ev->u.bval = ev->u.uhval != 0;
ev->et = ET_boolean;
return ev;
case ET_boolean:
return ev;
case ET_float:
- ev->u.bval = (ev->u.fval == 0.0) ? sal_False : sal_True;
+ ev->u.bval = ev->u.fval != 0.0;
ev->et = ET_boolean;
return ev;
case ET_double:
- ev->u.bval = (ev->u.dval == 0.0) ? sal_False : sal_True;
+ ev->u.bval = ev->u.dval != 0.0;
ev->et = ET_boolean;
return ev;
case ET_byte:
- ev->u.bval = (ev->u.byval == 0) ? sal_False : sal_True;
+ ev->u.bval = ev->u.byval != 0;
ev->et = ET_boolean;
return ev;
default:
@@ -561,7 +561,7 @@ coerce_value(AstExprValue *ev, ExprType t)
ev->et = ET_float;
return ev;
case ET_boolean:
- ev->u.fval = (ev->u.bval == sal_True) ? 1.0f : 0.0f;
+ ev->u.fval = ev->u.bval ? 1.0f : 0.0f;
ev->et = ET_float;
return ev;
case ET_float:
@@ -610,7 +610,7 @@ coerce_value(AstExprValue *ev, ExprType t)
ev->et = ET_double;
return ev;
case ET_boolean:
- ev->u.dval = (ev->u.bval == sal_True) ? 1.0 : 0.0;
+ ev->u.dval = ev->u.bval ? 1.0 : 0.0;
ev->et = ET_double;
return ev;
case ET_float:
@@ -667,7 +667,7 @@ coerce_value(AstExprValue *ev, ExprType t)
ev->et = ET_byte;
return ev;
case ET_boolean:
- ev->u.byval = (ev->u.bval == sal_False) ? 1 : 0;
+ ev->u.byval = (ev->u.bval == false) ? 1 : 0;
ev->et = ET_byte;
return ev;
case ET_float:
diff --git a/idlc/source/parser.y b/idlc/source/parser.y
index 1a6debd00b9e..e0bc51e220ab 100644
--- a/idlc/source/parser.y
+++ b/idlc/source/parser.y
@@ -273,7 +273,7 @@ bool includes(AstDeclaration const * type1, AstDeclaration const * type2) {
::rtl::OString* sval; /* OString value */
std::vector< rtl::OString > * svals;
sal_Char* strval; /* sal_Char* value */
- sal_Bool bval; /* sal_Boolean* value */
+ bool bval; /* sal_Boolean* value */
sal_Int64 ival; /* sal_Int64 value */
sal_uInt64 uval; /* sal_uInt64 value */
sal_uInt32 ulval; /* sal_uInt32 value */