summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJohnny Willemsen <jwillemsen@remedy.nl>2021-11-10 08:30:10 +0100
committerJohnny Willemsen <jwillemsen@remedy.nl>2021-11-10 08:30:10 +0100
commit43002d5505231e9e13870d6bec044166dd86480e (patch)
treeb6de465a003ec018cbbbea8f50f288cc28c92633
parent3681a73b62e4642ce8269babb1bd9eb75ac09604 (diff)
downloadATCD-43002d5505231e9e13870d6bec044166dd86480e.tar.gz
Add default assignment operator to fix gcc warnings
* ACE/ace/MEM_Addr.cpp: * ACE/ace/MEM_Addr.h: * ACE/ace/SPIPE_Addr.h: * ACE/ace/UNIX_Addr.h:
-rw-r--r--ACE/ace/MEM_Addr.cpp11
-rw-r--r--ACE/ace/MEM_Addr.h4
-rw-r--r--ACE/ace/SPIPE_Addr.h3
-rw-r--r--ACE/ace/UNIX_Addr.h3
4 files changed, 8 insertions, 13 deletions
diff --git a/ACE/ace/MEM_Addr.cpp b/ACE/ace/MEM_Addr.cpp
index 4e759900abc..1e021a27deb 100644
--- a/ACE/ace/MEM_Addr.cpp
+++ b/ACE/ace/MEM_Addr.cpp
@@ -51,17 +51,6 @@ ACE_MEM_Addr::ACE_MEM_Addr (u_short port_number)
this->initialize_local (port_number);
}
-ACE_MEM_Addr&
-ACE_MEM_Addr::operator= (const ACE_MEM_Addr& sa)
-{
- if (this != std::addressof(sa))
- {
- this->external_.set (sa.external_);
- this->internal_.set (sa.internal_);
- }
- return *this;
-}
-
int
ACE_MEM_Addr::initialize_local (u_short port_number)
{
diff --git a/ACE/ace/MEM_Addr.h b/ACE/ace/MEM_Addr.h
index ae9e8be008e..26485148dfa 100644
--- a/ACE/ace/MEM_Addr.h
+++ b/ACE/ace/MEM_Addr.h
@@ -40,8 +40,8 @@ public:
/// Copy constructor.
ACE_MEM_Addr (const ACE_MEM_Addr &);
- // Assignment operator
- ACE_MEM_Addr& operator= (const ACE_MEM_Addr& sa);
+ /// Assignment operator
+ ACE_MEM_Addr& operator= (const ACE_MEM_Addr& sa) = default;
/// Creates an ACE_MEM_Addr from a @a port_number
ACE_MEM_Addr (u_short port_number);
diff --git a/ACE/ace/SPIPE_Addr.h b/ACE/ace/SPIPE_Addr.h
index 455acd9acbb..f72e7b77910 100644
--- a/ACE/ace/SPIPE_Addr.h
+++ b/ACE/ace/SPIPE_Addr.h
@@ -39,6 +39,9 @@ public:
/// Copy constructor.
ACE_SPIPE_Addr (const ACE_SPIPE_Addr &sa);
+ /// Assignment operator
+ ACE_SPIPE_Addr& operator= (const ACE_SPIPE_Addr& sa) = default;
+
/// Create a ACE_SPIPE_Addr from a rendezvous point in the file
/// system.
ACE_SPIPE_Addr (const ACE_TCHAR *rendezvous_point, gid_t = 0, uid_t = 0);
diff --git a/ACE/ace/UNIX_Addr.h b/ACE/ace/UNIX_Addr.h
index fed5df7fab6..1400760e6d1 100644
--- a/ACE/ace/UNIX_Addr.h
+++ b/ACE/ace/UNIX_Addr.h
@@ -43,6 +43,9 @@ public:
/// Copy constructor.
ACE_UNIX_Addr (const ACE_UNIX_Addr &sa);
+ /// Assignment operator
+ ACE_UNIX_Addr& operator= (const ACE_UNIX_Addr& sa) = default;
+
/// Creates an ACE_UNIX_Addr from a string.
ACE_UNIX_Addr (const char rendezvous_point[]);