Skip to content

Commit

Permalink
Merge pull request #1299 from jwillemsen/jwi-taoidlcpp11
Browse files Browse the repository at this point in the history
Make use of std::addressof, std::strcmp and nullptr in the generated code
  • Loading branch information
jwillemsen authored Nov 19, 2020
2 parents 34d9e1f + 7644c58 commit a853ed1
Show file tree
Hide file tree
Showing 11 changed files with 133 additions and 135 deletions.
2 changes: 0 additions & 2 deletions ACE/ace/Dynamic.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,6 @@
#include "ace/Dynamic.inl"
#endif /* __ACE_INLINE__ */



ACE_BEGIN_VERSIONED_NAMESPACE_DECL

ACE_Dynamic::ACE_Dynamic (void)
Expand Down
6 changes: 5 additions & 1 deletion TAO/TAO_IDL/be/be_codegen.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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 ())
Expand Down Expand Up @@ -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
Expand Down
4 changes: 2 additions & 2 deletions TAO/TAO_IDL/be/be_component.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -364,15 +364,15 @@ 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;

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;
Expand Down
Loading

0 comments on commit a853ed1

Please sign in to comment.