From 8f4e07f9ce98ef3001b63cabf88812b5f4562170 Mon Sep 17 00:00:00 2001 From: Johnny Willemsen Date: Fri, 13 Sep 2019 13:36:39 +0200 Subject: No need to generate a copy constructor, the compile will generate one, fixes warnings with gcc9. When we have C++11 we can use the =default to indicate that the compiler generates one * TAO/TAO_IDL/be/be_visitor_sequence/sequence_ch.cpp: * TAO/TAO_IDL/be/be_visitor_sequence/sequence_cs.cpp: * TAO/tao/Object_KeyC.cpp: * TAO/tao/Object_KeyC.h: --- TAO/TAO_IDL/be/be_visitor_sequence/sequence_ch.cpp | 11 +++++++--- TAO/TAO_IDL/be/be_visitor_sequence/sequence_cs.cpp | 24 ---------------------- TAO/tao/Object_KeyC.cpp | 9 -------- TAO/tao/Object_KeyC.h | 7 ++++++- 4 files changed, 14 insertions(+), 37 deletions(-) diff --git a/TAO/TAO_IDL/be/be_visitor_sequence/sequence_ch.cpp b/TAO/TAO_IDL/be/be_visitor_sequence/sequence_ch.cpp index b9ada482b9c..6606887c9f8 100644 --- a/TAO/TAO_IDL/be/be_visitor_sequence/sequence_ch.cpp +++ b/TAO/TAO_IDL/be/be_visitor_sequence/sequence_ch.cpp @@ -237,9 +237,14 @@ int be_visitor_sequence_ch::visit_sequence (be_sequence *node) << "::CORBA::Boolean release = false);" << be_uidt; } - *os << be_nl - << node->local_name () << " (const " << node->local_name () - << " &);" << be_nl; + // Default copy/move constructor and assignment operators + *os << "\n#if defined (ACE_HAS_CPP11)" << be_nl + << node->local_name () << " (const " << node->local_name () << " &) = default;" << be_nl + << node->local_name () << " (" << node->local_name () << " &&) = default;" << be_nl + << node->local_name () << "& operator= (const " << node->local_name () << " &) = default;" << be_nl + << node->local_name () << "& operator= (" << node->local_name () << " &&) = default;" + << "\n#endif /* ACE_HAS_CPP11 */" << be_nl; + *os << "virtual ~" << node->local_name () << " (void);"; if (be_global->alt_mapping () && node->unbounded ()) diff --git a/TAO/TAO_IDL/be/be_visitor_sequence/sequence_cs.cpp b/TAO/TAO_IDL/be/be_visitor_sequence/sequence_cs.cpp index 659fe85a949..f06f0bf1693 100644 --- a/TAO/TAO_IDL/be/be_visitor_sequence/sequence_cs.cpp +++ b/TAO/TAO_IDL/be/be_visitor_sequence/sequence_cs.cpp @@ -201,30 +201,6 @@ int be_visitor_sequence_cs::visit_sequence (be_sequence *node) << "{}"; } - // Copy constructor. - *os << be_nl_2 - << node->name () << "::" << node->local_name () - << " (" << be_idt << be_idt_nl - << "const " << node->local_name () - << " &seq)" << be_uidt << be_uidt_nl - << " : " << be_idt << be_idt; - - // Pass it to the base constructor. - if (node->gen_base_class_name (os, - "", - this->ctx_->scope ()->decl ()) == -1) - { - ACE_ERROR_RETURN ((LM_ERROR, - ACE_TEXT ("be_visitor_sequence_cs::") - ACE_TEXT ("visit_sequence - ") - ACE_TEXT ("codegen for base ") - ACE_TEXT ("sequence class\n")), - -1); - } - - *os << " (seq)" << be_uidt << be_uidt_nl - << "{}"; - // Destructor. *os << be_nl_2 << node->name () << "::~" << node->local_name () diff --git a/TAO/tao/Object_KeyC.cpp b/TAO/tao/Object_KeyC.cpp index 5a1e8acf35d..6f128153b13 100644 --- a/TAO/tao/Object_KeyC.cpp +++ b/TAO/tao/Object_KeyC.cpp @@ -76,15 +76,6 @@ TAO::ObjectKey::ObjectKey ( (max, length, buffer, release) {} -TAO::ObjectKey::ObjectKey ( - const ObjectKey &seq - ) - : TAO::unbounded_value_sequence< - CORBA::Octet - > - (seq) -{} - TAO::ObjectKey::~ObjectKey (void) {} diff --git a/TAO/tao/Object_KeyC.h b/TAO/tao/Object_KeyC.h index f5523bf3b07..4224046edd5 100644 --- a/TAO/tao/Object_KeyC.h +++ b/TAO/tao/Object_KeyC.h @@ -92,7 +92,12 @@ namespace TAO CORBA::Octet* buffer, CORBA::Boolean release = false ); - ObjectKey (const ObjectKey &); +#if defined (ACE_HAS_CPP11) + ObjectKey (const ObjectKey &) = default; + ObjectKey (ObjectKey &&) = default; + ObjectKey& operator= (const ObjectKey &) = default; + ObjectKey& operator= (ObjectKey &&) = default; +#endif /* ACE_HAS_CPP11 */ ~ObjectKey (void); typedef ObjectKey_var _var_type; -- cgit v1.2.1 From 0f08d18e295a91caa31047b762756af6792cefba Mon Sep 17 00:00:00 2001 From: Johnny Willemsen Date: Fri, 13 Sep 2019 13:40:51 +0200 Subject: Updated file header * TAO/tao/Object_KeyC.h: --- TAO/tao/Object_KeyC.h | 50 ++++++++++++++++++++++++-------------------------- 1 file changed, 24 insertions(+), 26 deletions(-) diff --git a/TAO/tao/Object_KeyC.h b/TAO/tao/Object_KeyC.h index 4224046edd5..9854f40b8d0 100644 --- a/TAO/tao/Object_KeyC.h +++ b/TAO/tao/Object_KeyC.h @@ -1,26 +1,26 @@ // -*- C++ -*- -// **** Code generated by the The ACE ORB (TAO) IDL Compiler **** -// TAO and the TAO IDL Compiler have been developed by: -// Center for Distributed Object Computing -// Washington University -// St. Louis, MO -// USA -// http://www.cs.wustl.edu/~schmidt/doc-center.html -// and -// Distributed Object Computing Laboratory -// University of California at Irvine -// Irvine, CA -// USA -// http://doc.ece.uci.edu/ -// and -// Institute for Software Integrated Systems -// Vanderbilt University -// Nashville, TN -// USA -// http://www.isis.vanderbilt.edu/ -// -// Information about TAO is available at: -// http://www.dre.vanderbilt.edu/~schmidt/TAO.html +/** + * Code generated by the The ACE ORB (TAO) IDL Compiler v2.5.6 + * TAO and the TAO IDL Compiler have been developed by: + * Center for Distributed Object Computing + * Washington University + * St. Louis, MO + * USA + * and + * Distributed Object Computing Laboratory + * University of California at Irvine + * Irvine, CA + * USA + * and + * Institute for Software Integrated Systems + * Vanderbilt University + * Nashville, TN + * USA + * https://www.isis.vanderbilt.edu/ + * + * Information about TAO is available at: + * https://www.dre.vanderbilt.edu/~schmidt/TAO.html + **/ // TAO_IDL - Generated from // be\be_codegen.cpp:153 @@ -114,12 +114,10 @@ namespace TAO static void encode_sequence_to_string ( char* & str, - TAO::unbounded_value_sequence const & seq - ); + TAO::unbounded_value_sequence const & seq); static void decode_string_to_sequence ( TAO::unbounded_value_sequence &seq, - char const * str - ); + char const * str); static CORBA::Boolean is_legal (unsigned char c); /// A special method that gives no regard to how the ORB has -- cgit v1.2.1