summaryrefslogtreecommitdiff
path: root/TAO/TAO_IDL/be
diff options
context:
space:
mode:
authorparsons <parsons@ae88bc3d-4319-0410-8dbf-d08b4c9d3795>2005-10-12 04:05:29 +0000
committerparsons <parsons@ae88bc3d-4319-0410-8dbf-d08b4c9d3795>2005-10-12 04:05:29 +0000
commitcf375c1aafcf222e25a61a812e6070336916d2ff (patch)
tree8d26db9523a18f3b36f06d307d332dfa86af13a3 /TAO/TAO_IDL/be
parent347fceb340df50e059c89a34110200961cea605a (diff)
downloadATCD-cf375c1aafcf222e25a61a812e6070336916d2ff.tar.gz
ChangeLogTag: Wed Oct 12 03:59:27 UTC 2005 Jeff Parsons <j.parsons@vanderbilt.edu>
Diffstat (limited to 'TAO/TAO_IDL/be')
-rw-r--r--TAO/TAO_IDL/be/be_visitor_union/discriminant_ci.cpp4
-rw-r--r--TAO/TAO_IDL/be/be_visitor_union/union_cs.cpp4
2 files changed, 5 insertions, 3 deletions
diff --git a/TAO/TAO_IDL/be/be_visitor_union/discriminant_ci.cpp b/TAO/TAO_IDL/be/be_visitor_union/discriminant_ci.cpp
index e9873b90439..749f93c564f 100644
--- a/TAO/TAO_IDL/be/be_visitor_union/discriminant_ci.cpp
+++ b/TAO/TAO_IDL/be/be_visitor_union/discriminant_ci.cpp
@@ -78,6 +78,7 @@ be_visitor_union_discriminant_ci::visit_enum (be_enum *node)
<< "void " << be_nl
<< bu->name () << "::_default ()" << be_nl
<< "{" << be_idt_nl
+ << "this->_reset (this->disc_, false);" << be_nl
<< "this->disc_ = ";
be_type* dt =
@@ -172,6 +173,7 @@ be_visitor_union_discriminant_ci::visit_predefined_type (
<< "void " << be_nl
<< bu->name () << "::_default ()" << be_nl
<< "{" << be_idt_nl
+ << "this->_reset (this->disc_, false);" << be_nl
<< "this->disc_ = ";
switch (bu->udisc_type ())
@@ -199,7 +201,7 @@ be_visitor_union_discriminant_ci::visit_predefined_type (
os->print ("L'\\%d'", dv.u.wchar_val);
break;
case AST_Expression::EV_bool:
- *os << dv.u.bool_val;
+ *os << (dv.u.bool_val == 0 ? "false" : "true");
break;
case AST_Expression::EV_longlong:
diff --git a/TAO/TAO_IDL/be/be_visitor_union/union_cs.cpp b/TAO/TAO_IDL/be/be_visitor_union/union_cs.cpp
index db15ce18116..83721c478b6 100644
--- a/TAO/TAO_IDL/be/be_visitor_union/union_cs.cpp
+++ b/TAO/TAO_IDL/be/be_visitor_union/union_cs.cpp
@@ -245,11 +245,11 @@ int be_visitor_union_cs::visit_union (be_union *node)
*os << be_uidt_nl
<< "}" << be_nl << be_nl;
*os << "return *this;" << be_uidt_nl;
- *os << "}\n\n";
+ *os << "}" << be_nl << be_nl;
// The reset method.
this->ctx_->state (TAO_CodeGen::TAO_UNION_PUBLIC_RESET_CS);
- os->indent ();
+
*os << "// Reset method to reset old values of a union." << be_nl;
*os << "void " << node->name () << "::_reset (" << bt->name ()
<< ", ::CORBA::Boolean /*finalize*/)" << be_nl;