diff options
author | Johnny Willemsen <jwillemsen@remedy.nl> | 2021-11-10 10:17:20 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-11-10 10:17:20 +0100 |
commit | 330bee4fc0833c16295dd615a044735173b36687 (patch) | |
tree | f9ccdb645bd1b4e93e71cdeb15326e0f3ab1433b /ACE/ace/MEM_Addr.cpp | |
parent | f89faa003e82516b83d995a9fa62be46d248d586 (diff) | |
parent | 43002d5505231e9e13870d6bec044166dd86480e (diff) | |
download | ATCD-330bee4fc0833c16295dd615a044735173b36687.tar.gz |
Merge pull request #1719 from jwillemsen/jwi-memaddrwarning
Add default assignment operators to fix gcc warnings
Diffstat (limited to 'ACE/ace/MEM_Addr.cpp')
-rw-r--r-- | ACE/ace/MEM_Addr.cpp | 20 |
1 files changed, 6 insertions, 14 deletions
diff --git a/ACE/ace/MEM_Addr.cpp b/ACE/ace/MEM_Addr.cpp index 4ee10c5b663..1e021a27deb 100644 --- a/ACE/ace/MEM_Addr.cpp +++ b/ACE/ace/MEM_Addr.cpp @@ -20,8 +20,7 @@ ACE_BEGIN_VERSIONED_NAMESPACE_DECL ACE_ALLOC_HOOK_DEFINE(ACE_MEM_Addr) -// Transform the current address into string format. - +/// Transform the current address into string format. ACE_MEM_Addr::ACE_MEM_Addr () : ACE_Addr (AF_INET, sizeof (ACE_MEM_Addr)) { @@ -41,9 +40,7 @@ ACE_MEM_Addr::ACE_MEM_Addr (const ACE_TCHAR port_number[]) : ACE_Addr (AF_INET, sizeof (ACE_MEM_Addr)) { ACE_TRACE ("ACE_MEM_Addr::ACE_MEM_Addr"); - u_short pn = static_cast<u_short> (ACE_OS::strtoul (port_number, - 0, - 10)); + u_short const pn = static_cast<u_short> (ACE_OS::strtoul (port_number, 0, 10)); this->initialize_local (pn); } @@ -91,20 +88,16 @@ ACE_MEM_Addr::addr_to_string (ACE_TCHAR s[], } // Transform the string into the current addressing format. - int ACE_MEM_Addr::string_to_addr (const ACE_TCHAR s[]) { ACE_TRACE ("ACE_MEM_Addr::string_to_addr"); - u_short pn = static_cast<u_short> (ACE_OS::strtoul (s, - 0, - 10)); + u_short pn = static_cast<u_short> (ACE_OS::strtoul (s, 0, 10)); return this->set (pn); } -// Return the address. - +/// Return the address. void * ACE_MEM_Addr::get_addr () const { @@ -112,7 +105,7 @@ ACE_MEM_Addr::get_addr () const return this->external_.get_addr (); } -// Set a pointer to the address. +/// Set a pointer to the address. void ACE_MEM_Addr::set_addr (const void *addr, int len) { @@ -130,8 +123,7 @@ ACE_MEM_Addr::get_host_name (ACE_TCHAR hostname[], return this->external_.get_host_name (hostname, len); } -// Return the character representation of the hostname. - +/// Return the character representation of the hostname. const char * ACE_MEM_Addr::get_host_name () const { |