summaryrefslogtreecommitdiff
path: root/TAO/TAO_IDL/be/be_union.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'TAO/TAO_IDL/be/be_union.cpp')
-rw-r--r--TAO/TAO_IDL/be/be_union.cpp44
1 files changed, 22 insertions, 22 deletions
diff --git a/TAO/TAO_IDL/be/be_union.cpp b/TAO/TAO_IDL/be/be_union.cpp
index b5ce7cbd7d5..c483a315565 100644
--- a/TAO/TAO_IDL/be/be_union.cpp
+++ b/TAO/TAO_IDL/be/be_union.cpp
@@ -48,13 +48,13 @@ be_union::be_union (void)
be_type ()
{
// Always the case.
- this->has_constructor (true);
+ this->has_constructor (I_TRUE);
}
be_union::be_union (AST_ConcreteType *dt,
UTL_ScopedName *n,
- bool local,
- bool abstract)
+ idl_bool local,
+ idl_bool abstract)
: COMMON_Base (local,
abstract),
AST_Decl (AST_Decl::NT_union,
@@ -79,7 +79,7 @@ be_union::be_union (AST_ConcreteType *dt,
n)
{
// Always the case.
- this->has_constructor (true);
+ this->has_constructor (I_TRUE);
if (!this->imported ())
{
@@ -97,7 +97,7 @@ be_union::redefine (AST_Structure *from)
AST_Union::redefine (from);
}
-bool
+idl_bool
be_union::has_duplicate_case_labels (void)
{
for (UTL_ScopeActiveIterator si (this, UTL_Scope::IK_decls);
@@ -110,11 +110,11 @@ be_union::has_duplicate_case_labels (void)
if (ub->label_list_length () > 1)
{
- return true;
+ return I_TRUE;
}
}
- return false;
+ return I_FALSE;
}
void
@@ -132,38 +132,38 @@ be_union::accept (be_visitor *visitor)
return visitor->visit_union (this);
}
-bool
+idl_bool
be_union::gen_empty_default_label (void)
{
// A non-empty explicit default label will be generated.
if (this->default_index () != -1)
{
- return false;
+ return I_FALSE;
}
-
+
AST_ConcreteType *disc = this->disc_type ();
AST_Decl::NodeType nt = disc->node_type ();
-
+
if (nt == AST_Decl::NT_enum)
{
- return true;
+ return I_TRUE;
}
-
+
AST_PredefinedType *pdt = AST_PredefinedType::narrow_from_decl (disc);
-
+
if (pdt == 0)
{
- return true;
+ return I_TRUE;
}
-
+
unsigned long n_labels = this->nlabels ();
-
+
if (pdt->pt () == AST_PredefinedType::PT_boolean && n_labels == 2)
{
- return false;
+ return I_FALSE;
}
-
- return true;
+
+ return I_TRUE;
}
unsigned long
@@ -180,11 +180,11 @@ be_union::nlabels (void)
AST_UnionBranch::narrow_from_decl (d);
if (ub != 0)
- {
+ {
retval += ub->label_list_length ();
}
}
-
+
return retval;
}