diff options
author | Johnny Willemsen <jwillemsen@remedy.nl> | 2020-11-18 12:22:31 +0100 |
---|---|---|
committer | Johnny Willemsen <jwillemsen@remedy.nl> | 2020-11-18 12:22:31 +0100 |
commit | 7644c58b73f64f9c89a2b59c3d6981a387136810 (patch) | |
tree | 072f4faf21a60c4b127bc017c2448e935309bbba /TAO/TAO_IDL | |
parent | e9d9555b2aec5f9e15c34de0509af6742a5a3c86 (diff) | |
download | ATCD-7644c58b73f64f9c89a2b59c3d6981a387136810.tar.gz |
Make use of std::addressof, std::strcmp and nullptr in the generated code. Removed some intermediate typedefs which are not required anymore
* TAO/TAO_IDL/be/be_codegen.cpp:
* TAO/TAO_IDL/be/be_component.cpp:
* TAO/TAO_IDL/be/be_interface.cpp:
* TAO/TAO_IDL/be/be_visitor_interface/amh_ss.cpp:
* TAO/TAO_IDL/be/be_visitor_interface/cdr_op_cs.cpp:
* TAO/TAO_IDL/be/be_visitor_interface/interface_cs.cpp:
* TAO/TAO_IDL/be/be_visitor_interface/interface_ss.cpp:
* TAO/TAO_IDL/be/be_visitor_operation/ami_cs.cpp:
* TAO/TAO_IDL/be/be_visitor_operation/operation.cpp:
* TAO/TAO_IDL/be/be_visitor_operation/operation_ss.cpp:
Diffstat (limited to 'TAO/TAO_IDL')
-rw-r--r-- | TAO/TAO_IDL/be/be_codegen.cpp | 6 | ||||
-rw-r--r-- | TAO/TAO_IDL/be/be_component.cpp | 4 | ||||
-rw-r--r-- | TAO/TAO_IDL/be/be_interface.cpp | 208 | ||||
-rw-r--r-- | TAO/TAO_IDL/be/be_visitor_interface/amh_ss.cpp | 2 | ||||
-rw-r--r-- | TAO/TAO_IDL/be/be_visitor_interface/cdr_op_cs.cpp | 13 | ||||
-rw-r--r-- | TAO/TAO_IDL/be/be_visitor_interface/interface_cs.cpp | 2 | ||||
-rw-r--r-- | TAO/TAO_IDL/be/be_visitor_interface/interface_ss.cpp | 15 | ||||
-rw-r--r-- | TAO/TAO_IDL/be/be_visitor_operation/ami_cs.cpp | 4 | ||||
-rw-r--r-- | TAO/TAO_IDL/be/be_visitor_operation/operation.cpp | 6 | ||||
-rw-r--r-- | TAO/TAO_IDL/be/be_visitor_operation/operation_ss.cpp | 6 |
10 files changed, 133 insertions, 133 deletions
diff --git a/TAO/TAO_IDL/be/be_codegen.cpp b/TAO/TAO_IDL/be/be_codegen.cpp index 4dfbf131304..afd56feaac4 100644 --- a/TAO/TAO_IDL/be/be_codegen.cpp +++ b/TAO/TAO_IDL/be/be_codegen.cpp @@ -2793,7 +2793,7 @@ TAO_CodeGen::gen_stub_src_includes (void) { // Needed for _narrow(), which is now template-based. this->gen_standard_include (this->client_stubs_, - "ace/OS_NS_string.h"); + "cstring"); } if (be_global->gen_amh_classes ()) @@ -2940,6 +2940,10 @@ TAO_CodeGen::gen_skel_src_includes (void) // For Static_Allocator_Base this->gen_standard_include (this->server_skeletons_, "ace/Malloc_Allocator.h"); + + // For std::strcmp + this->gen_standard_include (this->server_skeletons_, + "cstring"); } void diff --git a/TAO/TAO_IDL/be/be_component.cpp b/TAO/TAO_IDL/be/be_component.cpp index 63422981970..ac4dff9851d 100644 --- a/TAO/TAO_IDL/be/be_component.cpp +++ b/TAO/TAO_IDL/be/be_component.cpp @@ -364,7 +364,7 @@ be_component::gen_is_a_ancestors (TAO_OutStream *os) while (ancestor != 0) { - *os << "ACE_OS::strcmp (" << be_idt << be_idt_nl + *os << "std::strcmp (" << be_idt << be_idt_nl << "value," << be_nl << "\"" << ancestor->repoID () << "\"" << be_uidt_nl << ") == 0 ||" << be_uidt_nl; @@ -372,7 +372,7 @@ be_component::gen_is_a_ancestors (TAO_OutStream *os) ancestor = ancestor->base_component (); } - *os << "ACE_OS::strcmp (" << be_idt << be_idt_nl + *os << "std::strcmp (" << be_idt << be_idt_nl << "value," << be_nl << "\"IDL:omg.org/Components/CCMObject:1.0\"" << be_uidt_nl << ") == 0" << be_uidt << be_uidt_nl; diff --git a/TAO/TAO_IDL/be/be_interface.cpp b/TAO/TAO_IDL/be/be_interface.cpp index edcf8b3d9d4..59caee482bd 100644 --- a/TAO/TAO_IDL/be/be_interface.cpp +++ b/TAO/TAO_IDL/be/be_interface.cpp @@ -981,15 +981,15 @@ be_interface::gen_operation_table (const char *flat_name, // Generate the skeleton for the is_a method. if (amh) { - *os << "{\"_is_a\", &TAO_AMH_Skeletons::_is_a_amh_skel, 0}," << be_nl; + *os << "{\"_is_a\", std::addressof(TAO_AMH_Skeletons::_is_a_amh_skel), nullptr}," << be_nl; } else if (be_global->gen_thru_poa_collocation ()) { - *os << "{\"_is_a\", &TAO_ServantBase::_is_a_thru_poa_skel, 0}," << be_nl; + *os << "{\"_is_a\", std::addressof(TAO_ServantBase::_is_a_thru_poa_skel), nullptr}," << be_nl; } else { - *os << "{\"_is_a\", &TAO_ServantBase::_is_a_skel, 0}," << be_nl; + *os << "{\"_is_a\", std::addressof(TAO_ServantBase::_is_a_skel), nullptr}," << be_nl; } ++this->skel_count_; @@ -998,18 +998,18 @@ be_interface::gen_operation_table (const char *flat_name, { if (amh) { - *os << "{\"_non_existent\", &TAO_AMH_Skeletons" - << "::_non_existent_amh_skel, 0}," << be_nl; + *os << "{\"_non_existent\", std::addressof(TAO_AMH_Skeletons" + << "::_non_existent_amh_skel), nullptr}," << be_nl; } else if (be_global->gen_thru_poa_collocation ()) { - *os << "{\"_non_existent\", &TAO_ServantBase" - << "::_non_existent_thru_poa_skel, 0}," << be_nl; + *os << "{\"_non_existent\", std::addressof(TAO_ServantBase" + << "::_non_existent_thru_poa_skel), nullptr}," << be_nl; } else { - *os << "{\"_non_existent\", &TAO_ServantBase" - << "::_non_existent_skel, 0}," << be_nl; + *os << "{\"_non_existent\", std::addressof(TAO_ServantBase" + << "::_non_existent_skel), nullptr}," << be_nl; } ++this->skel_count_; @@ -1019,18 +1019,18 @@ be_interface::gen_operation_table (const char *flat_name, { if (amh) { - *os << "{\"_component\", &TAO_AMH_Skeletons" - << "::_component_amh_skel, 0}," << be_nl; + *os << "{\"_component\", std::addressof(TAO_AMH_Skeletons" + << "::_component_amh_skel), nullptr}," << be_nl; } else if (be_global->gen_thru_poa_collocation ()) { - *os << "{\"_component\", &TAO_ServantBase" - << "::_component_thru_poa_skel, 0}," << be_nl; + *os << "{\"_component\", std::addressof(TAO_ServantBase" + << "::_component_thru_poa_skel), nullptr}," << be_nl; } else { - *os << "{\"_component\", &TAO_ServantBase" - << "::_component_skel, 0}," << be_nl; + *os << "{\"_component\", std::addressof(TAO_ServantBase" + << "::_component_skel), nullptr}," << be_nl; } ++this->skel_count_; @@ -1040,13 +1040,13 @@ be_interface::gen_operation_table (const char *flat_name, { if (amh) { - *os << "{\"_interface\", &TAO_AMH_Skeletons" - << "::_interface_amh_skel, 0}," << be_nl; + *os << "{\"_interface\", std::addressof(TAO_AMH_Skeletons" + << "::_interface_amh_skel), nullptr}," << be_nl; } else { - *os << "{\"_interface\", &TAO_ServantBase" - << "::_interface_skel, 0}," << be_nl; + *os << "{\"_interface\", std::addressof(TAO_ServantBase" + << "::_interface_skel), nullptr}," << be_nl; } ++this->skel_count_; @@ -1056,18 +1056,18 @@ be_interface::gen_operation_table (const char *flat_name, { if (amh) { - *os << "{\"_repository_id\", &TAO_AMH_Skeletons" - << "::_repository_id_amh_skel, 0}" << be_uidt_nl; + *os << "{\"_repository_id\", std::addressof(TAO_AMH_Skeletons" + << "::_repository_id_amh_skel), nullptr}" << be_uidt_nl; } else if (be_global->gen_thru_poa_collocation ()) { - *os << "{\"_repository_id\", &TAO_ServantBase" - << "::_repository_id_thru_poa_skel, 0}" << be_uidt_nl; + *os << "{\"_repository_id\", std::addressof(TAO_ServantBase" + << "::_repository_id_thru_poa_skel), nullptr}" << be_uidt_nl; } else { - *os << "{\"_repository_id\", &TAO_ServantBase" - << "::_repository_id_skel, 0}" << be_uidt_nl; + *os << "{\"_repository_id\", std::addressof(TAO_ServantBase" + << "::_repository_id_skel), nullptr}" << be_uidt_nl; } ++this->skel_count_; @@ -1205,18 +1205,18 @@ be_interface::gen_operation_table (const char *flat_name, if (amh) { - *os << "_is_a,&TAO_AMH_Skeletons" - << "::_is_a_amh_skel, 0" << be_nl; + *os << "_is_a,std::addressof(TAO_AMH_Skeletons" + << "::_is_a_amh_skel), nullptr" << be_nl; } else if (be_global->gen_thru_poa_collocation ()) { - *os << "_is_a,&TAO_ServantBase" - << "::_is_a_thru_poa_skel, 0" << be_nl; + *os << "_is_a,std::addressof(TAO_ServantBase" + << "::_is_a_thru_poa_skel), nullptr" << be_nl; } else { - *os << "_is_a,&TAO_ServantBase" - << "::_is_a_skel, 0" << be_nl; + *os << "_is_a,std::addressof(TAO_ServantBase" + << "::_is_a_skel), nullptr" << be_nl; } ++this->skel_count_; @@ -1225,18 +1225,18 @@ be_interface::gen_operation_table (const char *flat_name, { if (amh) { - *os << "_non_existent,&TAO_AMH_Skeletons" - << "::_non_existent_amh_skel, 0" << be_nl; + *os << "_non_existent,std::addressof(TAO_AMH_Skeletons" + << "::_non_existent_amh_skel), nullptr" << be_nl; } else if (be_global->gen_thru_poa_collocation ()) { - *os << "_non_existent,&TAO_ServantBase" - << "::_non_existent_thru_poa_skel, 0" << be_nl; + *os << "_non_existent,std::addressof(TAO_ServantBase" + << "::_non_existent_thru_poa_skel), nullptr" << be_nl; } else { - *os << "_non_existent,&TAO_ServantBase" - << "::_non_existent_skel, 0" << be_nl; + *os << "_non_existent,std::addressof(TAO_ServantBase" + << "::_non_existent_skel), nullptr" << be_nl; } ++this->skel_count_; @@ -1246,18 +1246,18 @@ be_interface::gen_operation_table (const char *flat_name, { if (amh) { - *os << "_component,&TAO_AMH_Skeletons" - << "::_component_amh_skel, 0" << be_nl; + *os << "_component,std::addressof(TAO_AMH_Skeletons" + << "::_component_amh_skel), nullptr" << be_nl; } else if (be_global->gen_thru_poa_collocation ()) { - *os << "_component,&TAO_ServantBase" - << "::_component_thru_poa_skel, 0" << be_nl; + *os << "_component,std::addressof(TAO_ServantBase" + << "::_component_thru_poa_skel), nullptr" << be_nl; } else { - *os << "_component,&TAO_ServantBase" - << "::_component_skel, 0" << be_nl; + *os << "_component,std::addressof(TAO_ServantBase" + << "::_component_skel), nullptr" << be_nl; } ++this->skel_count_; } @@ -1266,13 +1266,13 @@ be_interface::gen_operation_table (const char *flat_name, { if (amh) { - *os << "_interface,&TAO_AMH_Skeletons" - << "::_interface_amh_skel, 0" << be_nl; + *os << "_interface,std::addressof(TAO_AMH_Skeletons" + << "::_interface_amh_skel), nullptr" << be_nl; } else { - *os << "_interface,&TAO_ServantBase" - << "::_interface_skel, 0" << be_nl; + *os << "_interface,std::addressof(TAO_ServantBase" + << "::_interface_skel), nullptr" << be_nl; } ++this->skel_count_; @@ -1282,18 +1282,18 @@ be_interface::gen_operation_table (const char *flat_name, { if (amh) { - *os << "_repository_id,&TAO_AMH_Skeletons" - << "::_repository_id_amh_skel, 0" << be_nl; + *os << "_repository_id,std::addressof(TAO_AMH_Skeletons" + << "::_repository_id_amh_skel), nullptr" << be_nl; } else if (be_global->gen_thru_poa_collocation ()) { - *os << "_repository_id,&TAO_ServantBase" - << "::_repository_id_thru_poa_skel, 0" << be_nl; + *os << "_repository_id,std::addressof(TAO_ServantBase" + << "::_repository_id_thru_poa_skel), nullptr" << be_nl; } else { - *os << "_repository_id,&TAO_ServantBase" - << "::_repository_id_skel, 0" << be_nl; + *os << "_repository_id,std::addressof(TAO_ServantBase" + << "::_repository_id_skel), nullptr" << be_nl; } ++this->skel_count_; @@ -1395,19 +1395,19 @@ be_interface::gen_optable_entries (be_interface *derived_interface, } // We are an operation node. - *os << "{\"" << d->original_local_name () << "\", &" + *os << "{\"" << d->original_local_name () << "\", std::addressof(" << full_skeleton_name << "::" - << d->local_name () << "_skel,"; + << d->local_name () << "_skel),"; if (be_global->gen_direct_collocation ()) { - *os << " &" + *os << " std::addressof(" << this->full_direct_proxy_impl_name () - << "::" << d->local_name (); + << "::" << d->local_name () << ")"; } else { - *os << " 0"; + *os << " nullptr"; } *os << "}," << be_nl; @@ -1425,18 +1425,18 @@ be_interface::gen_optable_entries (be_interface *derived_interface, // Generate only the "get" entry if we are // readonly. *os << "{\"_get_" << d->original_local_name () - << "\", &" << full_skeleton_name - << "::_get_" << d->local_name () << "_skel,"; + << "\", std::addressof(" << full_skeleton_name + << "::_get_" << d->local_name () << "_skel),"; if (be_global->gen_direct_collocation ()) { - *os << " &" + *os << " std::addressof(" << this->full_direct_proxy_impl_name () - << "::_get_" << d->local_name (); + << "::_get_" << d->local_name () << ")"; } else { - *os << " 0"; + *os << " nullptr"; } *os << "}," << be_nl; @@ -1447,18 +1447,18 @@ be_interface::gen_optable_entries (be_interface *derived_interface, { // The set method *os << "{\"_set_" << d->original_local_name () - << "\", &" << full_skeleton_name - << "::_set_" << d->local_name () << "_skel,"; + << "\", std::addressof(" << full_skeleton_name + << "::_set_" << d->local_name () << "_skel),"; if (be_global->gen_direct_collocation ()) { - *os << " &" + *os << " std::addressof(" << this->full_direct_proxy_impl_name () - << "::_set_" << d->local_name (); + << "::_set_" << d->local_name () << ")"; } else { - *os << " 0"; + *os << " nullptr"; } *os << "}," << be_nl; @@ -1513,54 +1513,54 @@ be_interface::gen_optable_entries (be_interface *derived_interface, { ACE_CString nspace = name.substring (0, name.rfind (':') - 1); name = name.substring (name.rfind (':') + 1); - *os << d->original_local_name () << ",&POA_" + *os << d->original_local_name () << ",std::addressof(POA_" << nspace.c_str () << "::AMH_" << name.c_str () << "::" << d->original_local_name () - << "_skel,"; + << "_skel),"; } else { - *os << d->original_local_name () << ",&POA_AMH_" + *os << d->original_local_name () << ",std::addressof(POA_AMH_" << name.c_str () << "::" << d->original_local_name () - << "_skel,"; + << "_skel),"; } } else { if (!d->is_abstract ()) { - *os << d->original_local_name () << ",&POA_" - << d->full_name () << "_skel,"; + *os << d->original_local_name () << ",std::addressof(POA_" + << d->full_name () << "_skel),"; } else { - *os << d->original_local_name () << ",&" + *os << d->original_local_name () << ",std::addressof(" << full_skeleton_name << "::" << d->original_local_name () - << "_skel,"; + << "_skel),"; } } if (be_global->gen_direct_collocation ()) { if (!d->is_abstract ()) { - *os << " &" + *os << " std::addressof(" << this->full_direct_proxy_impl_name () - << "::" << d->local_name (); + << "::" << d->local_name () << ")"; } else { - *os << " &" + *os << " std::addressof(" << derived_interface->full_direct_proxy_impl_name () - << "::" << d->local_name (); + << "::" << d->local_name () << ")"; } } else { - *os << " 0"; + *os << " nullptr"; } *os << "\n"; @@ -1588,15 +1588,15 @@ be_interface::gen_optable_entries (be_interface *derived_interface, if (!d->is_abstract ()) { - *os << "_get_" << d->original_local_name () << ",&POA_" + *os << "_get_" << d->original_local_name () << ",std::addressof(POA_" << nspace.c_str () << "_get_" - << d->original_local_name () << "_skel,"; + << d->original_local_name () << "_skel),"; if (be_global->gen_direct_collocation ()) { - *os << " &" + *os << " std::addressof(" << this->full_direct_proxy_impl_name () - << "::_get_" << d->local_name (); + << "::_get_" << d->local_name () << ")"; } else { @@ -1605,19 +1605,19 @@ be_interface::gen_optable_entries (be_interface *derived_interface, } else { - *os << "_get_" << d->original_local_name () << ",&" + *os << "_get_" << d->original_local_name () << ",std::addressof(" << full_skeleton_name << "::_get_" - << d->original_local_name () << "_skel,"; + << d->original_local_name () << "_skel),"; if (be_global->gen_direct_collocation ()) { - *os << " &" + *os << " std::addressof(" << derived_interface->full_direct_proxy_impl_name () - << "::_get_" << d->local_name (); + << "::_get_" << d->local_name () << ")"; } else { - *os << " 0"; + *os << " nullptr"; } } @@ -1630,37 +1630,37 @@ be_interface::gen_optable_entries (be_interface *derived_interface, if (!d->is_abstract ()) { // The set method - *os << "_set_" << d->original_local_name () << ",&POA_" + *os << "_set_" << d->original_local_name () << ",std::addressof(POA_" << nspace.c_str () << "_set_" - << d->original_local_name () << "_skel,"; + << d->original_local_name () << "_skel),"; if (be_global->gen_direct_collocation ()) { - *os << " &" + *os << " std::addressof(" << this->full_direct_proxy_impl_name () - << "::_set_" << d->local_name (); + << "::_set_" << d->local_name () << ")"; } else { - *os << " 0"; + *os << " nullptr"; } } else { // The set method in case abstract - *os << "_set_" << d->original_local_name () << ",&" + *os << "_set_" << d->original_local_name () << ",std::addressof(" << full_skeleton_name << "::_set_" - << d->original_local_name () << "_skel,"; + << d->original_local_name () << "_skel),"; if (be_global->gen_direct_collocation ()) { - *os << " &" + *os << " std::addressof(" << derived_interface->full_direct_proxy_impl_name () - << "::_set_" << d->local_name (); + << "::_set_" << d->local_name () << ")"; } else { - *os << " 0"; + *os << " nullptr"; } } @@ -2309,7 +2309,7 @@ be_interface::is_a_helper (be_interface * /*derived*/, TAO_OutStream *os) { // Emit the comparison code. - *os << "ACE_OS::strcmp (" << be_idt << be_idt_nl + *os << "std::strcmp (" << be_idt << be_idt_nl << "value," << be_nl << "\"" << bi->repoID () << "\"" << be_uidt_nl << ") == 0 ||" << be_uidt_nl; @@ -2756,14 +2756,14 @@ be_interface::gen_is_a_ancestors (TAO_OutStream *os) if (this->is_abstract () || this->has_mixed_parentage ()) { - *os << "ACE_OS::strcmp (" << be_idt << be_idt_nl + *os << "std::strcmp (" << be_idt << be_idt_nl << "value," << be_nl << "\"IDL:omg.org/CORBA/AbstractBase:1.0\"" << be_uidt_nl << ") == 0"; } else if (this->is_local ()) { - *os << "ACE_OS::strcmp (" << be_idt << be_idt_nl + *os << "std::strcmp (" << be_idt << be_idt_nl << "value," << be_nl << "\"IDL:omg.org/CORBA/LocalObject:1.0\"" << be_uidt_nl << ") == 0"; @@ -2780,7 +2780,7 @@ be_interface::gen_is_a_ancestors (TAO_OutStream *os) if (! this->is_abstract ()) { - *os << "ACE_OS::strcmp (" << be_idt << be_idt_nl + *os << "std::strcmp (" << be_idt << be_idt_nl << "value," << be_nl << "\"IDL:omg.org/CORBA/Object:1.0\"" << be_uidt_nl << ") == 0" << be_uidt << be_uidt_nl; diff --git a/TAO/TAO_IDL/be/be_visitor_interface/amh_ss.cpp b/TAO/TAO_IDL/be/be_visitor_interface/amh_ss.cpp index 2097910dd48..8d014379fb1 100644 --- a/TAO/TAO_IDL/be/be_visitor_interface/amh_ss.cpp +++ b/TAO/TAO_IDL/be/be_visitor_interface/amh_ss.cpp @@ -79,7 +79,7 @@ be_visitor_amh_interface_ss::this_method (be_interface *node) << "ACE_NEW_RETURN (" << be_idt << be_idt_nl << "tmp," << be_nl << "::CORBA::Object (stub, _tao_opt_colloc, this)," << be_nl - << "0" << be_uidt_nl + << "nullptr" << be_uidt_nl << ");" << be_uidt_nl << be_nl; *os << "::CORBA::Object_var obj = tmp;" << be_nl diff --git a/TAO/TAO_IDL/be/be_visitor_interface/cdr_op_cs.cpp b/TAO/TAO_IDL/be/be_visitor_interface/cdr_op_cs.cpp index d9a04a235e5..c57d4b2b710 100644 --- a/TAO/TAO_IDL/be/be_visitor_interface/cdr_op_cs.cpp +++ b/TAO/TAO_IDL/be/be_visitor_interface/cdr_op_cs.cpp @@ -106,25 +106,24 @@ be_visitor_interface_cdr_op_cs::visit_interface (be_interface *node) << "if (!(strm >> obj.inout ()))" << be_idt_nl << "{" << be_idt_nl << "return false;" << be_uidt_nl - << "}" << be_uidt_nl << be_nl - << "typedef ::" << node->name () << " RHS_SCOPED_NAME;" - << be_nl_2 + << "}" << be_uidt_nl + << be_nl << "// Narrow to the right type." << be_nl; - *os << "_tao_objref =" << be_idt_nl; + *os << "_tao_objref = "; if (!node->is_abstract ()) { - *os << "TAO::Narrow_Utils<RHS_SCOPED_NAME>::unchecked_narrow (" + *os << "TAO::Narrow_Utils< ::" << node->name () << ">::unchecked_narrow (" << "obj.in ());"; } else { - *os << "TAO::AbstractBase_Narrow_Utils<RHS_SCOPED_NAME>::unchecked_narrow (" + *os << "TAO::AbstractBase_Narrow_Utils< ::" << node->name () << ">::unchecked_narrow (" << "obj.in ());"; } - *os << be_nl << be_uidt_nl; + *os << be_nl_2; *os << "return true;" << be_uidt_nl << "}" << be_nl; diff --git a/TAO/TAO_IDL/be/be_visitor_interface/interface_cs.cpp b/TAO/TAO_IDL/be/be_visitor_interface/interface_cs.cpp index ecbea914119..ef03c91b8fe 100644 --- a/TAO/TAO_IDL/be/be_visitor_interface/interface_cs.cpp +++ b/TAO/TAO_IDL/be/be_visitor_interface/interface_cs.cpp @@ -263,7 +263,7 @@ be_visitor_interface_cs::visit_interface (be_interface *node) << node->full_name () << "::_nil (void)" << be_nl << "{" << be_idt_nl - << "return 0;" << be_uidt_nl + << "return nullptr;" << be_uidt_nl << "}" << be_nl_2; // The _duplicate method diff --git a/TAO/TAO_IDL/be/be_visitor_interface/interface_ss.cpp b/TAO/TAO_IDL/be/be_visitor_interface/interface_ss.cpp index 7dd0ce2818c..1cfc137cb60 100644 --- a/TAO/TAO_IDL/be/be_visitor_interface/interface_ss.cpp +++ b/TAO/TAO_IDL/be/be_visitor_interface/interface_ss.cpp @@ -182,7 +182,7 @@ be_visitor_interface_ss::visit_interface (be_interface *node) -1); } - *os << "!ACE_OS::strcmp (" << be_idt << be_idt_nl + *os << "!std::strcmp (" << be_idt << be_idt_nl << "value," << be_nl << "\"IDL:omg.org/CORBA/Object:1.0\"" << be_uidt_nl << ")"; @@ -190,7 +190,7 @@ be_visitor_interface_ss::visit_interface (be_interface *node) if (node->has_mixed_parentage ()) { *os << " ||" << be_uidt_nl - << "!ACE_OS::strcmp (" << be_idt << be_idt_nl + << "!std::strcmp (" << be_idt << be_idt_nl << "value," << be_nl << "\"IDL:omg.org/CORBA/AbstractBase:1.0\"" << be_uidt_nl @@ -397,18 +397,15 @@ be_visitor_interface_ss::this_method (be_interface *node) *os << "_tao_opt_colloc"; *os << ", this)," << be_nl - << "0);" << be_uidt << be_uidt_nl << be_nl; + << "nullptr);" << be_uidt << be_uidt_nl << be_nl; *os << "::CORBA::Object_var obj = tmp;" << be_nl << "(void) safe_stub.release ();" << be_nl_2 - << "typedef ::" << node->name () << " STUB_SCOPED_NAME;" - << be_nl - << "return" << be_idt_nl - << "TAO::Narrow_Utils<STUB_SCOPED_NAME>::unchecked_narrow (" - << be_idt << be_idt_nl + << "return " + << "TAO::Narrow_Utils< ::" << node->name () << ">::unchecked_narrow (" << "obj.in ());"; - *os << be_uidt << be_uidt << be_uidt << be_uidt_nl + *os << be_uidt_nl << "}"; } 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 474624f6d01..f1a910055dc 100644 --- a/TAO/TAO_IDL/be/be_visitor_operation/ami_cs.cpp +++ b/TAO/TAO_IDL/be/be_visitor_operation/ami_cs.cpp @@ -154,7 +154,7 @@ be_visitor_operation_ami_cs::visit_operation (be_operation *node) *os << be_nl_2 << "TAO::Argument *_the_tao_operation_signature[] =" << be_idt_nl << "{" << be_idt_nl - << "&_tao_retval"; + << "std::addressof(_tao_retval)"; AST_Argument *arg = 0; UTL_ScopeActiveIterator arg_list_iter (ami_op, @@ -168,7 +168,7 @@ be_visitor_operation_ami_cs::visit_operation (be_operation *node) arg = dynamic_cast<AST_Argument*> (arg_list_iter.item ()); *os << "," << be_nl - << "&_tao_" << arg->local_name (); + << "std::addressof(_tao_" << arg->local_name () << ")"; } *os << be_uidt_nl diff --git a/TAO/TAO_IDL/be/be_visitor_operation/operation.cpp b/TAO/TAO_IDL/be/be_visitor_operation/operation.cpp index 87714104cf1..597bfccc55e 100644 --- a/TAO/TAO_IDL/be/be_visitor_operation/operation.cpp +++ b/TAO/TAO_IDL/be/be_visitor_operation/operation.cpp @@ -213,7 +213,7 @@ be_visitor_operation::gen_stub_operation_body ( *os << be_nl_2 << "TAO::Argument *_the_tao_operation_signature [] =" << be_idt_nl << "{" << be_idt_nl - << "&_tao_retval"; + << "std::addressof(_tao_retval)"; AST_Argument *arg = 0; @@ -224,7 +224,7 @@ be_visitor_operation::gen_stub_operation_body ( arg = dynamic_cast<AST_Argument*> (arg_list_iter.item ()); *os << "," << be_nl - << "&_tao_" << arg->local_name (); + << "std::addressof(_tao_" << arg->local_name () << ")"; } *os << be_uidt_nl @@ -329,7 +329,7 @@ be_visitor_operation::gen_stub_operation_body ( } else { - *os << "_tao_call.invoke (0, 0);"; + *os << "_tao_call.invoke (nullptr, 0);"; } if (!this->void_return_type (return_type)) diff --git a/TAO/TAO_IDL/be/be_visitor_operation/operation_ss.cpp b/TAO/TAO_IDL/be/be_visitor_operation/operation_ss.cpp index aad01312713..88e6e0fc0e4 100644 --- a/TAO/TAO_IDL/be/be_visitor_operation/operation_ss.cpp +++ b/TAO/TAO_IDL/be/be_visitor_operation/operation_ss.cpp @@ -220,7 +220,7 @@ be_visitor_operation_ss::gen_skel_operation_body (be_operation * node, *os << be_nl_2 << "TAO::Argument * const args[] =" << be_idt_nl << "{" << be_idt_nl - << "&retval"; + << "std::addressof(retval)"; for (UTL_ScopeActiveIterator arg_list_iter (node, UTL_Scope::IK_decls); ! arg_list_iter.is_done (); @@ -230,7 +230,7 @@ be_visitor_operation_ss::gen_skel_operation_body (be_operation * node, dynamic_cast<AST_Argument*> (arg_list_iter.item ()); *os << "," << be_nl - << "&_tao_" << arg->local_name (); + << "std::addressof(_tao_" << arg->local_name () << ")"; } *os << be_uidt_nl @@ -280,7 +280,7 @@ be_visitor_operation_ss::gen_skel_operation_body (be_operation * node, } else { - *os << " , 0" << be_nl + *os << " , nullptr" << be_nl << " , 0"; } |