diff options
author | Johnny Willemsen <jwillemsen@remedy.nl> | 2022-09-18 11:53:46 +0200 |
---|---|---|
committer | Johnny Willemsen <jwillemsen@remedy.nl> | 2022-09-18 11:53:46 +0200 |
commit | d7c2081760f1fed0c7e5929c35b7cc0fe9429c2e (patch) | |
tree | 5be307586991e4632f1ad9ab475a442342bac841 | |
parent | f110de2e2657cf09094d799152c52cff8c285afa (diff) | |
download | ATCD-d7c2081760f1fed0c7e5929c35b7cc0fe9429c2e.tar.gz |
Use uniform initialisation for require_truncation_ so tha we can generate a default constructor
* TAO/TAO_IDL/be/be_visitor_valuebox/valuebox_cs.cpp:
* TAO/TAO_IDL/be/be_visitor_valuetype/valuetype_cs.cpp:
* TAO/TAO_IDL/be/be_visitor_valuetype/valuetype_init_cs.cpp:
* TAO/TAO_IDL/be/be_visitor_valuetype/valuetype_obv_ch.cpp:
* TAO/TAO_IDL/be/be_visitor_valuetype/valuetype_obv_cs.cpp:
5 files changed, 7 insertions, 20 deletions
diff --git a/TAO/TAO_IDL/be/be_visitor_valuebox/valuebox_cs.cpp b/TAO/TAO_IDL/be/be_visitor_valuebox/valuebox_cs.cpp index ac230e533f0..96f252b024c 100644 --- a/TAO/TAO_IDL/be/be_visitor_valuebox/valuebox_cs.cpp +++ b/TAO/TAO_IDL/be/be_visitor_valuebox/valuebox_cs.cpp @@ -83,7 +83,7 @@ be_visitor_valuebox_cs::visit_valuebox (be_valuebox *node) << node->name () << " *" << be_nl << node->name () << "::_downcast (::CORBA::ValueBase *v)" << be_nl << "{" << be_idt_nl - << "return dynamic_cast< ::" << node->name () << " * > (v);" + << "return dynamic_cast<::" << node->name () << " *> (v);" << be_uidt_nl << "}" << be_nl_2; // _copy_value method diff --git a/TAO/TAO_IDL/be/be_visitor_valuetype/valuetype_cs.cpp b/TAO/TAO_IDL/be/be_visitor_valuetype/valuetype_cs.cpp index 979bfd31bbf..c00607388b7 100644 --- a/TAO/TAO_IDL/be/be_visitor_valuetype/valuetype_cs.cpp +++ b/TAO/TAO_IDL/be/be_visitor_valuetype/valuetype_cs.cpp @@ -89,8 +89,8 @@ be_visitor_valuetype_cs::visit_valuetype (be_valuetype *node) << node->name () << " *" << be_nl << node->name () << "::_downcast (::CORBA::ValueBase *v)" << be_nl << "{" << be_idt_nl - << "return dynamic_cast< ::" << node->name () - << " * > (v);" << be_uidt_nl + << "return dynamic_cast<::" << node->name () + << " *> (v);" << be_uidt_nl << "}" << be_nl_2; // The _tao_obv_repository_id method. diff --git a/TAO/TAO_IDL/be/be_visitor_valuetype/valuetype_init_cs.cpp b/TAO/TAO_IDL/be/be_visitor_valuetype/valuetype_init_cs.cpp index 5c6b747d4ba..38b0f4a769d 100644 --- a/TAO/TAO_IDL/be/be_visitor_valuetype/valuetype_init_cs.cpp +++ b/TAO/TAO_IDL/be/be_visitor_valuetype/valuetype_init_cs.cpp @@ -86,8 +86,8 @@ be_visitor_valuetype_init_cs::visit_valuetype (be_valuetype *node) << node->name () << "_init *" << be_nl << node->name () << "_init::_downcast (::CORBA::ValueFactoryBase *v)" << be_nl << "{" << be_idt_nl - << "return dynamic_cast< ::" << node->name () - << "_init * > (v);" << be_uidt_nl + << "return dynamic_cast<::" << node->name () + << "_init *> (v);" << be_uidt_nl << "}"; // tao_repository_id 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 8ad3186a1e7..ce0e205990b 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 @@ -164,7 +164,7 @@ be_visitor_valuetype_obv_ch::visit_valuetype (be_valuetype *node) *os << "OBV_"; } - *os << node->local_name () << " ();"; + *os << node->local_name () << " () = default;"; // Initializing constructor. if (node->has_member ()) @@ -238,7 +238,7 @@ be_visitor_valuetype_obv_ch::visit_valuetype (be_valuetype *node) } *os << be_nl - << "CORBA::Boolean require_truncation_;" << be_uidt_nl + << "CORBA::Boolean require_truncation_ {false};" << 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 59b88670304..f168a8421d4 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 @@ -42,18 +42,6 @@ be_visitor_valuetype_obv_cs::visit_valuetype (be_valuetype *node) TAO_INSERT_COMMENT (os); - // Default constructor. - *os << node->full_obv_skel_name () << "::"; - - if (! node->is_nested ()) - { - *os << "OBV_"; - } - - *os << node->local_name () << " ()" << be_nl; - *os << ": require_truncation_ (false)" << be_nl - << "{}" << be_nl_2; - // Initializing constructor. if (node->has_member ()) { @@ -70,7 +58,6 @@ be_visitor_valuetype_obv_cs::visit_valuetype (be_valuetype *node) this->gen_obv_init_constructor_args (node, index); *os << ")" << be_uidt << be_uidt << be_uidt_nl - << ": require_truncation_ (false)" << be_nl << "{" << be_idt; this->gen_obv_init_constructor_inits (node); |