summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJohnny Willemsen <jwillemsen@remedy.nl>2019-09-13 17:31:31 +0200
committerGitHub <noreply@github.com>2019-09-13 17:31:31 +0200
commit8835c90554d9e43a3f8504bff99c53768d98f609 (patch)
treeb2d7b360dd34d1d0ddb8399ebf43cf3423a97493
parent39aeb39df2db97ca26a55d102cf65703b1bfb868 (diff)
parent0f08d18e295a91caa31047b762756af6792cefba (diff)
downloadATCD-8835c90554d9e43a3f8504bff99c53768d98f609.tar.gz
Merge pull request #961 from jwillemsen/jwi-defaultcopyassign
No need to generate a copy constructor, the compile will generate oneā€¦
-rw-r--r--TAO/TAO_IDL/be/be_visitor_sequence/sequence_ch.cpp11
-rw-r--r--TAO/TAO_IDL/be/be_visitor_sequence/sequence_cs.cpp24
-rw-r--r--TAO/tao/Object_KeyC.cpp9
-rw-r--r--TAO/tao/Object_KeyC.h57
4 files changed, 38 insertions, 63 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..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
@@ -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;
@@ -109,12 +114,10 @@ namespace TAO
static void encode_sequence_to_string (
char* & str,
- TAO::unbounded_value_sequence<CORBA::Octet> const & seq
- );
+ TAO::unbounded_value_sequence<CORBA::Octet> const & seq);
static void decode_string_to_sequence (
TAO::unbounded_value_sequence<CORBA::Octet> &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