summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJohnny Willemsen <jwillemsen@remedy.nl>2020-12-09 13:30:00 +0100
committerJohnny Willemsen <jwillemsen@remedy.nl>2020-12-09 13:30:00 +0100
commit68af84b8a645ccf8f2d45ba545ec0acf84bc8335 (patch)
treeebfa8f4df14c3485c02c1051992f06c29a619389
parenta69b2cd747a58b77ca62e0f02f44ea62f1421b62 (diff)
downloadATCD-68af84b8a645ccf8f2d45ba545ec0acf84bc8335.tar.gz
Minor changes to TAO_IDL generated code
* TAO/TAO_IDL/be/be_visitor_attr_return.cpp: * TAO/TAO_IDL/be/be_visitor_component/component_ami_rh_exs.cpp: * TAO/TAO_IDL/be/be_visitor_component/context_svts.cpp: * TAO/TAO_IDL/be/be_visitor_component/executor_exs.cpp: * TAO/TAO_IDL/be/be_visitor_component/servant_svs.cpp: * TAO/TAO_IDL/be/be_visitor_exception/exception_ch.cpp: * TAO/TAO_IDL/be/be_visitor_exception/exception_cs.cpp: * TAO/TAO_IDL/be/be_visitor_operation/ami_cs.cpp: * TAO/TAO_IDL/be/be_visitor_operation/ami_handler_reply_stub_operation_cs.cpp: * TAO/TAO_IDL/be/be_visitor_valuebox/field_ch.cpp: * TAO/TAO_IDL/be/be_visitor_valuebox/field_ci.cpp: * TAO/TAO_IDL/be/be_visitor_valuebox/union_member_ci.cpp: * TAO/TAO_IDL/be/be_visitor_valuetype/arglist.cpp: * TAO/TAO_IDL/be/be_visitor_valuetype/valuetype_ch.cpp: * TAO/TAO_IDL/be/be_visitor_valuetype/valuetype_cs.cpp: * TAO/TAO_IDL/be/be_visitor_valuetype/valuetype_init_arglist_ch.cpp:
-rw-r--r--TAO/TAO_IDL/be/be_visitor_attr_return.cpp2
-rw-r--r--TAO/TAO_IDL/be/be_visitor_component/component_ami_rh_exs.cpp2
-rw-r--r--TAO/TAO_IDL/be/be_visitor_component/context_svts.cpp6
-rw-r--r--TAO/TAO_IDL/be/be_visitor_component/executor_exs.cpp4
-rw-r--r--TAO/TAO_IDL/be/be_visitor_component/servant_svs.cpp6
-rw-r--r--TAO/TAO_IDL/be/be_visitor_exception/exception_ch.cpp2
-rw-r--r--TAO/TAO_IDL/be/be_visitor_exception/exception_cs.cpp14
-rw-r--r--TAO/TAO_IDL/be/be_visitor_operation/ami_cs.cpp2
-rw-r--r--TAO/TAO_IDL/be/be_visitor_operation/ami_handler_reply_stub_operation_cs.cpp2
-rw-r--r--TAO/TAO_IDL/be/be_visitor_valuebox/field_ch.cpp2
-rw-r--r--TAO/TAO_IDL/be/be_visitor_valuebox/field_ci.cpp2
-rw-r--r--TAO/TAO_IDL/be/be_visitor_valuebox/union_member_ci.cpp2
-rw-r--r--TAO/TAO_IDL/be/be_visitor_valuetype/arglist.cpp2
-rw-r--r--TAO/TAO_IDL/be/be_visitor_valuetype/valuetype_ch.cpp4
-rw-r--r--TAO/TAO_IDL/be/be_visitor_valuetype/valuetype_cs.cpp2
-rw-r--r--TAO/TAO_IDL/be/be_visitor_valuetype/valuetype_init_arglist_ch.cpp2
16 files changed, 25 insertions, 31 deletions
diff --git a/TAO/TAO_IDL/be/be_visitor_attr_return.cpp b/TAO/TAO_IDL/be/be_visitor_attr_return.cpp
index 37873af1783..731e32bb18d 100644
--- a/TAO/TAO_IDL/be/be_visitor_attr_return.cpp
+++ b/TAO/TAO_IDL/be/be_visitor_attr_return.cpp
@@ -114,7 +114,7 @@ be_visitor_attr_return::visit_predefined_type (
<< this->attr_name_string_.c_str () << ".in ());";
break;
case AST_PredefinedType::PT_any:
- os_ << "::CORBA::Any * retval = 0;" << be_nl
+ os_ << "::CORBA::Any * retval {};" << be_nl
<< "ACE_NEW_RETURN (" << be_idt_nl
<< "retval," << be_nl
<< "::CORBA::Any ("
diff --git a/TAO/TAO_IDL/be/be_visitor_component/component_ami_rh_exs.cpp b/TAO/TAO_IDL/be/be_visitor_component/component_ami_rh_exs.cpp
index b27b9fc6642..854c2c0f2c3 100644
--- a/TAO/TAO_IDL/be/be_visitor_component/component_ami_rh_exs.cpp
+++ b/TAO/TAO_IDL/be/be_visitor_component/component_ami_rh_exs.cpp
@@ -112,7 +112,7 @@ be_visitor_component_ami_rh_exs::visit_operation (
if (count == 0 && vrt)
{
- os_ << "void)";
+ os_ << ")";
}
else
{
diff --git a/TAO/TAO_IDL/be/be_visitor_component/context_svts.cpp b/TAO/TAO_IDL/be/be_visitor_component/context_svts.cpp
index 347b10ee719..3b1355474cb 100644
--- a/TAO/TAO_IDL/be/be_visitor_component/context_svts.cpp
+++ b/TAO/TAO_IDL/be/be_visitor_component/context_svts.cpp
@@ -192,7 +192,7 @@ be_visitor_context_svts::visit_publishes (be_publishes *node)
os_ << be_nl
<< be_nl
- << "::Components::Cookie * retv = 0;" << be_nl
+ << "::Components::Cookie * retv {};" << be_nl
<< "ACE_NEW_THROW_EX (retv," << be_nl
<< " ::CIAO::Cookie_Impl (ptr),"
<< be_nl
@@ -397,7 +397,7 @@ be_visitor_context_svts::gen_uses_multiplex (
<< " 0);" << be_nl_2;
os_ << "::" << node_->full_name () << "::" << port_name
- << "Connections * tmp_retv = 0;" << be_nl
+ << "Connections * tmp_retv {};" << be_nl
<< "ACE_NEW_THROW_EX (tmp_retv," << be_nl
<< " ::" << node_->full_name ()
<< "::" << port_name << "Connections (" << be_nl
@@ -465,7 +465,7 @@ be_visitor_context_svts::gen_uses_multiplex (
<< "}";
os_ << be_nl_2
- << "::Components::Cookie * ck = 0;" << be_nl
+ << "::Components::Cookie * ck {};" << be_nl
<< "ACE_NEW_THROW_EX (ck," << be_nl
<< " ::CIAO::Cookie_Impl (ptr),"
<< be_nl
diff --git a/TAO/TAO_IDL/be/be_visitor_component/executor_exs.cpp b/TAO/TAO_IDL/be/be_visitor_component/executor_exs.cpp
index c1a7263238c..d2d93264f93 100644
--- a/TAO/TAO_IDL/be/be_visitor_component/executor_exs.cpp
+++ b/TAO/TAO_IDL/be/be_visitor_component/executor_exs.cpp
@@ -208,7 +208,7 @@ be_visitor_executor_exs::visit_component (be_component *node)
<< "ACE_Reactor*" << be_nl
<< lname << "_exec_i::reactor ()" << be_nl
<< "{" << be_idt_nl
- << "ACE_Reactor* reactor = 0;" << be_nl
+ << "ACE_Reactor* reactor {};" << be_nl
<< "::CORBA::Object_var ccm_object = " << be_idt_nl
<< "this->ciao_context_->get_CCM_object();" << be_uidt_nl
<< "if (! ::CORBA::is_nil (ccm_object.in ())) " << be_idt_nl
@@ -357,7 +357,7 @@ be_visitor_executor_exs::visit_provides (be_provides *node)
<< "if ( ::CORBA::is_nil (this->ciao_" << port_name
<< "_.in ()))" << be_idt_nl
<< "{" << be_idt_nl
- << lname << "_exec_i *tmp = 0;" << be_nl
+ << lname << "_exec_i *tmp {};" << be_nl
<< "ACE_NEW_RETURN (" << be_idt_nl
<< "tmp," << be_nl
<< lname << "_exec_i (" << be_idt_nl
diff --git a/TAO/TAO_IDL/be/be_visitor_component/servant_svs.cpp b/TAO/TAO_IDL/be/be_visitor_component/servant_svs.cpp
index 391d75a5be1..3f081adcfb4 100644
--- a/TAO/TAO_IDL/be/be_visitor_component/servant_svs.cpp
+++ b/TAO/TAO_IDL/be/be_visitor_component/servant_svs.cpp
@@ -775,7 +775,7 @@ be_visitor_servant_svs::gen_publishes_top ()
<< node_->local_name ()
<< "_Servant::get_all_publishers ()" << be_nl
<< "{" << be_idt_nl
- << "::Components::PublisherDescriptions *retval = 0;"
+ << "::Components::PublisherDescriptions *retval {};"
<< be_nl
<< "ACE_NEW_THROW_EX (retval," << be_nl
<< " ::Components::PublisherDescriptions,"
@@ -882,7 +882,7 @@ be_visitor_servant_svs::gen_uses_top ()
<< node_->local_name ()
<< "_Servant::get_all_receptacles ()" << be_nl
<< "{" << be_idt_nl
- << "::Components::ReceptacleDescriptions * retval = 0;"
+ << "::Components::ReceptacleDescriptions * retval {};"
<< be_nl
<< "ACE_NEW_THROW_EX (retval," << be_nl
<< " ::Components::ReceptacleDescriptions,"
@@ -1003,7 +1003,7 @@ be_visitor_servant_svs::gen_get_all_emitters ()
<< node_->local_name ()
<< "_Servant::get_all_emitters ()" << be_nl
<< "{" << be_idt_nl
- << "::Components::EmitterDescriptions *retval = 0;"
+ << "::Components::EmitterDescriptions *retval {};"
<< be_nl
<< "ACE_NEW_THROW_EX (retval," << be_nl
<< " ::Components::EmitterDescriptions,"
diff --git a/TAO/TAO_IDL/be/be_visitor_exception/exception_ch.cpp b/TAO/TAO_IDL/be/be_visitor_exception/exception_ch.cpp
index 94508097dd4..ad0751a4dad 100644
--- a/TAO/TAO_IDL/be/be_visitor_exception/exception_ch.cpp
+++ b/TAO/TAO_IDL/be/be_visitor_exception/exception_ch.cpp
@@ -61,7 +61,7 @@ int be_visitor_exception_ch::visit_exception (be_exception *node)
<< node->local_name () << " ();" << be_nl
<< node->local_name () << " (const " << node->local_name ()
<< " &);" << be_nl
- << "~" << node->local_name () << " (void);\n" << be_nl;
+ << "~" << node->local_name () << " () = default;\n" << be_nl;
// Assignment operator.
*os << node->local_name () << " &operator= (const "
diff --git a/TAO/TAO_IDL/be/be_visitor_exception/exception_cs.cpp b/TAO/TAO_IDL/be/be_visitor_exception/exception_cs.cpp
index fda3de5ef27..a25dc7fb3da 100644
--- a/TAO/TAO_IDL/be/be_visitor_exception/exception_cs.cpp
+++ b/TAO/TAO_IDL/be/be_visitor_exception/exception_cs.cpp
@@ -107,12 +107,6 @@ int be_visitor_exception_cs::visit_exception (be_exception *node)
*os << "{" << be_nl;
*os << "}" << be_nl_2;
- // Destructor.
- *os << node->name () << "::~" << node->local_name ()
- << " ()" << be_nl;
- *os << "{" << be_nl;
- *os << "}" << be_nl_2;
-
// Copy constructor.
*os << node->name () << "::" << node->local_name () << " (const ::"
<< node->name () << " &_tao_excp)" << be_idt_nl;
@@ -203,18 +197,18 @@ int be_visitor_exception_cs::visit_exception (be_exception *node)
*os << "::CORBA::Exception *" << node->name ()
<< "::_alloc ()" << be_nl;
*os << "{" << be_idt_nl;
- *os << "::CORBA::Exception *retval = 0;" << be_nl
+ *os << "::CORBA::Exception *retval {};" << be_nl
<< "ACE_NEW_RETURN (retval, ::" << node->name ()
- << ", 0);" << be_nl
+ << ", nullptr);" << be_nl
<< "return retval;" << be_uidt_nl;
*os << "}" << be_nl_2;
*os << "::CORBA::Exception *" << be_nl
<< node->name () << "::_tao_duplicate () const" << be_nl
<< "{" << be_idt_nl
- << "::CORBA::Exception *result = 0;" << be_nl
+ << "::CORBA::Exception *result {};" << be_nl
<< "ACE_NEW_RETURN (result, "
- << "::" << node->name () << " (*this), 0);"
+ << "::" << node->name () << " (*this), nullptr);"
<< be_nl
<< "return result;" << be_uidt_nl
<< "}" << be_nl_2;
diff --git a/TAO/TAO_IDL/be/be_visitor_operation/ami_cs.cpp b/TAO/TAO_IDL/be/be_visitor_operation/ami_cs.cpp
index de538be52bf..b073286e4d7 100644
--- a/TAO/TAO_IDL/be/be_visitor_operation/ami_cs.cpp
+++ b/TAO/TAO_IDL/be/be_visitor_operation/ami_cs.cpp
@@ -136,7 +136,7 @@ be_visitor_operation_ami_cs::visit_operation (be_operation *node)
// type is void. No need to generate argument list.
*os << be_nl_2
- << "TAO::Argument ** _the_tao_operation_signature = 0;";
+ << "TAO::Argument ** _the_tao_operation_signature {};";
nargs = 0; // Don't count the reply handler.
}
else
diff --git a/TAO/TAO_IDL/be/be_visitor_operation/ami_handler_reply_stub_operation_cs.cpp b/TAO/TAO_IDL/be/be_visitor_operation/ami_handler_reply_stub_operation_cs.cpp
index ede3ab5369e..8be04af15e1 100644
--- a/TAO/TAO_IDL/be/be_visitor_operation/ami_handler_reply_stub_operation_cs.cpp
+++ b/TAO/TAO_IDL/be/be_visitor_operation/ami_handler_reply_stub_operation_cs.cpp
@@ -205,7 +205,7 @@ be_visitor_operation_ami_handler_reply_stub_operation_cs::visit_operation (
<< "0);" << be_uidt
<< be_uidt_nl;
- *os << "::Messaging::ExceptionHolder* exception_holder_ptr = 0;" << be_nl
+ *os << "::Messaging::ExceptionHolder* exception_holder_ptr {};" << be_nl
<< "ACE_NEW (" << be_idt << be_idt_nl
<< "exception_holder_ptr," << be_nl
<< "::TAO::ExceptionHolder (" << be_idt_nl
diff --git a/TAO/TAO_IDL/be/be_visitor_valuebox/field_ch.cpp b/TAO/TAO_IDL/be/be_visitor_valuebox/field_ch.cpp
index 7b8b075314c..fa546645e9b 100644
--- a/TAO/TAO_IDL/be/be_visitor_valuebox/field_ch.cpp
+++ b/TAO/TAO_IDL/be/be_visitor_valuebox/field_ch.cpp
@@ -520,5 +520,5 @@ be_visitor_valuebox_field_ch::emit_member_get (be_decl *field,
TAO_OutStream *os = this->ctx_->stream ();
*os << const_prefix << field_type->name () << type_suffix << " "
- << field->local_name () << " (void) " << const_method << ";" << be_nl;
+ << field->local_name () << " () " << const_method << ";" << be_nl;
}
diff --git a/TAO/TAO_IDL/be/be_visitor_valuebox/field_ci.cpp b/TAO/TAO_IDL/be/be_visitor_valuebox/field_ci.cpp
index 481adfd98b2..31bbb25ea69 100644
--- a/TAO/TAO_IDL/be/be_visitor_valuebox/field_ci.cpp
+++ b/TAO/TAO_IDL/be/be_visitor_valuebox/field_ci.cpp
@@ -589,7 +589,7 @@ be_visitor_valuebox_field_ci::emit_member_get (be_decl *field,
*os << "ACE_INLINE " << const_prefix << field_type->name () << type_suffix
<< be_nl
<< vb_node_->name () << "::" << field->local_name ()
- << " (void) " << const_method << be_nl
+ << " () " << const_method << be_nl
<< "{" << be_idt_nl
<< "return this->_pd_value->" << field->local_name () << access_modifier
<< ";" << be_uidt_nl
diff --git a/TAO/TAO_IDL/be/be_visitor_valuebox/union_member_ci.cpp b/TAO/TAO_IDL/be/be_visitor_valuebox/union_member_ci.cpp
index 7d3ad3438e5..562a4fa0dea 100644
--- a/TAO/TAO_IDL/be/be_visitor_valuebox/union_member_ci.cpp
+++ b/TAO/TAO_IDL/be/be_visitor_valuebox/union_member_ci.cpp
@@ -544,7 +544,7 @@ be_visitor_valuebox_union_member_ci::emit_member_get (
*os << "ACE_INLINE " << const_prefix << field_type->name () << type_suffix
<< be_nl
<< vb_node_->name () << "::" << field->local_name ()
- << " (void) " << const_method << be_nl
+ << " () " << const_method << be_nl
<< "{" << be_idt_nl
<< "return this->_pd_value->" << field->local_name ()
<< " ();" << be_uidt_nl
diff --git a/TAO/TAO_IDL/be/be_visitor_valuetype/arglist.cpp b/TAO/TAO_IDL/be/be_visitor_valuetype/arglist.cpp
index 16722cf0364..3047404a425 100644
--- a/TAO/TAO_IDL/be/be_visitor_valuetype/arglist.cpp
+++ b/TAO/TAO_IDL/be/be_visitor_valuetype/arglist.cpp
@@ -79,7 +79,7 @@ be_visitor_obv_operation_arglist::visit_operation (be_operation *node)
}
else
{
- *os << "void)";
+ *os << ")";
}
be_visitor_context ctx = *this->ctx_;
diff --git a/TAO/TAO_IDL/be/be_visitor_valuetype/valuetype_ch.cpp b/TAO/TAO_IDL/be/be_visitor_valuetype/valuetype_ch.cpp
index cd93330c0d1..08e9c233fbc 100644
--- a/TAO/TAO_IDL/be/be_visitor_valuetype/valuetype_ch.cpp
+++ b/TAO/TAO_IDL/be/be_visitor_valuetype/valuetype_ch.cpp
@@ -243,8 +243,8 @@ be_visitor_valuetype_ch::visit_valuetype (be_valuetype *node)
if (node->n_supports () > 0)
{
*os << be_uidt_nl << be_nl << "public:" << be_idt_nl;
- *os << be_nl << "virtual void _add_ref (void) = 0;" << be_nl;
- *os << "virtual void _remove_ref (void) = 0;" << be_nl;
+ *os << be_nl << "virtual void _add_ref () = 0;" << be_nl;
+ *os << "virtual void _remove_ref () = 0;" << be_nl;
*os << "virtual ::CORBA::ValueBase *_tao_to_value ();";
}
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 cc4c7a339bf..f09a8cd5313 100644
--- a/TAO/TAO_IDL/be/be_visitor_valuetype/valuetype_cs.cpp
+++ b/TAO/TAO_IDL/be/be_visitor_valuetype/valuetype_cs.cpp
@@ -323,7 +323,7 @@ be_visitor_valuetype_cs::visit_valuetype (be_valuetype *node)
<< node->local_name () << " *&new_object" << be_uidt_nl
<< ")" << be_uidt_nl
<< "{" << be_idt_nl
- << "::CORBA::ValueBase *base = 0;" << be_nl
+ << "::CORBA::ValueBase *base {};" << be_nl
<< "::CORBA::Boolean is_indirected = false;" << be_nl
<< "::CORBA::Boolean is_null_object = false;" << be_nl
<< "::CORBA::Boolean const retval =" << be_idt_nl
diff --git a/TAO/TAO_IDL/be/be_visitor_valuetype/valuetype_init_arglist_ch.cpp b/TAO/TAO_IDL/be/be_visitor_valuetype/valuetype_init_arglist_ch.cpp
index 478f369c7cc..86bdaea0b8e 100644
--- a/TAO/TAO_IDL/be/be_visitor_valuetype/valuetype_init_arglist_ch.cpp
+++ b/TAO/TAO_IDL/be/be_visitor_valuetype/valuetype_init_arglist_ch.cpp
@@ -49,7 +49,7 @@ be_visitor_valuetype_init_arglist_ch::visit_factory (be_factory *node)
}
else
{
- os << "void)";
+ os << ")";
}
return 0;