summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChad Elliott <elliottc@objectcomputing.com>2022-12-15 09:06:46 -0600
committerChad Elliott <elliottc@objectcomputing.com>2022-12-15 09:06:46 -0600
commit96e2b77bc99cf7e2841b84921a7baad3003548e5 (patch)
treea2792c038785fb5852f1a7e98bc0077da2b4f8d1
parent8022b6898339d0027578c0af19888dc8f2752b9c (diff)
downloadATCD-96e2b77bc99cf7e2841b84921a7baad3003548e5.tar.gz
Only emit the require_truncation_ boolean if CDR support is enabled.
-rw-r--r--TAO/TAO_IDL/be/be_visitor_valuetype/valuetype_obv_ch.cpp8
-rw-r--r--TAO/TAO_IDL/be/be_visitor_valuetype/valuetype_obv_cs.cpp16
2 files changed, 17 insertions, 7 deletions
diff --git a/TAO/TAO_IDL/be/be_visitor_valuetype/valuetype_obv_ch.cpp b/TAO/TAO_IDL/be/be_visitor_valuetype/valuetype_obv_ch.cpp
index d5ee46dfc80..a27fd6c00fb 100644
--- a/TAO/TAO_IDL/be/be_visitor_valuetype/valuetype_obv_ch.cpp
+++ b/TAO/TAO_IDL/be/be_visitor_valuetype/valuetype_obv_ch.cpp
@@ -237,8 +237,12 @@ be_visitor_valuetype_obv_ch::visit_valuetype (be_valuetype *node)
this->gen_pd (node);
}
- *os << be_nl
- << "CORBA::Boolean require_truncation_;" << be_uidt_nl
+ if (be_global->cdr_support ())
+ {
+ *os << be_nl
+ << "CORBA::Boolean require_truncation_;";
+ }
+ *os << be_uidt_nl
<< "};";
}
diff --git a/TAO/TAO_IDL/be/be_visitor_valuetype/valuetype_obv_cs.cpp b/TAO/TAO_IDL/be/be_visitor_valuetype/valuetype_obv_cs.cpp
index 3a7b3e077a0..8a021b68a1a 100644
--- a/TAO/TAO_IDL/be/be_visitor_valuetype/valuetype_obv_cs.cpp
+++ b/TAO/TAO_IDL/be/be_visitor_valuetype/valuetype_obv_cs.cpp
@@ -51,8 +51,11 @@ be_visitor_valuetype_obv_cs::visit_valuetype (be_valuetype *node)
}
*os << node->local_name () << " (void)" << be_nl;
- *os << ": require_truncation_ (false)" << be_nl
- << "{}" << be_nl_2;
+ if (be_global->cdr_support ())
+ {
+ *os << ": require_truncation_ (false)" << be_nl;
+ }
+ *os << "{}" << be_nl_2;
// Initializing constructor.
if (node->has_member ())
@@ -69,9 +72,12 @@ be_visitor_valuetype_obv_cs::visit_valuetype (be_valuetype *node)
unsigned long index = 0;
this->gen_obv_init_constructor_args (node, index);
- *os << ")" << be_uidt << be_uidt << be_uidt_nl
- << ": require_truncation_ (false)" << be_nl
- << "{" << be_idt;
+ *os << ")" << be_uidt << be_uidt << be_uidt_nl;
+ if (be_global->cdr_support ())
+ {
+ *os << ": require_truncation_ (false)" << be_nl;
+ }
+ *os << "{" << be_idt;
this->gen_obv_init_constructor_inits (node);