diff options
author | ocielliottc <elliottc@objectcomputing.com> | 2022-12-15 15:21:43 -0600 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-12-15 15:21:43 -0600 |
commit | 3dd98a78e8be0ca7630a577ab90e6267b420622c (patch) | |
tree | f150b4731f390d1fb169e7de0e500454c6a0dd17 | |
parent | e2191d0ed81004845a123b20519bf0718f4cb689 (diff) | |
parent | 96e2b77bc99cf7e2841b84921a7baad3003548e5 (diff) | |
download | ATCD-3dd98a78e8be0ca7630a577ab90e6267b420622c.tar.gz |
Merge pull request #2001 from DOCGroup/elliottc/cdr_support_require_truncation
[ace6tao2] Only emit the require_truncation_ boolean if CDR support is enabled.
-rw-r--r-- | TAO/TAO_IDL/be/be_visitor_valuetype/valuetype_obv_ch.cpp | 8 | ||||
-rw-r--r-- | TAO/TAO_IDL/be/be_visitor_valuetype/valuetype_obv_cs.cpp | 16 |
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); |