diff options
author | Johnny Willemsen <jwillemsen@remedy.nl> | 2022-10-04 16:54:06 +0200 |
---|---|---|
committer | Johnny Willemsen <jwillemsen@remedy.nl> | 2022-10-04 16:54:06 +0200 |
commit | 4d827f7dbfef927d913e6bc20a8360b78bb07242 (patch) | |
tree | 50f6107c53f0f48fc343d04b6722add622fb9ea9 /TAO | |
parent | 4c3def36744df114bd9d24a3426be39dec53b497 (diff) | |
download | ATCD-4d827f7dbfef927d913e6bc20a8360b78bb07242.tar.gz |
Use nullptr/std::addressof/default/uniform initialization
:
* ACE/ace/OS_NS_netdb.inl:
* TAO/tao/Endpoint.h:
* TAO/tao/Endpoint.inl:
* TAO/tao/IIOP_Endpoint.cpp:
* TAO/tao/IIOP_Endpoint.h:
Diffstat (limited to 'TAO')
-rw-r--r-- | TAO/tao/Endpoint.h | 2 | ||||
-rw-r--r-- | TAO/tao/Endpoint.inl | 1 | ||||
-rw-r--r-- | TAO/tao/IIOP_Endpoint.cpp | 6 | ||||
-rw-r--r-- | TAO/tao/IIOP_Endpoint.h | 3 |
4 files changed, 3 insertions, 9 deletions
diff --git a/TAO/tao/Endpoint.h b/TAO/tao/Endpoint.h index cd93ab8f352..18d8e46135f 100644 --- a/TAO/tao/Endpoint.h +++ b/TAO/tao/Endpoint.h @@ -124,7 +124,7 @@ protected: mutable TAO_SYNCH_MUTEX addr_lookup_lock_; /// Cache the hash value - CORBA::ULong hash_val_; + CORBA::ULong hash_val_ {}; /// IOP tag, identifying the protocol for which this endpoint /// contains addressing info. diff --git a/TAO/tao/Endpoint.inl b/TAO/tao/Endpoint.inl index 17025738d69..99e0438fd79 100644 --- a/TAO/tao/Endpoint.inl +++ b/TAO/tao/Endpoint.inl @@ -9,7 +9,6 @@ TAO_Endpoint::TAO_Endpoint (CORBA::ULong tag, // which case this optimizaton wouldn't work. We can get around // that using a bool. But we don't want to increase the runtime // memory. - , hash_val_ (0) , tag_ (tag) , priority_ (priority) diff --git a/TAO/tao/IIOP_Endpoint.cpp b/TAO/tao/IIOP_Endpoint.cpp index 3f4dbfc101c..3389f4e5459 100644 --- a/TAO/tao/IIOP_Endpoint.cpp +++ b/TAO/tao/IIOP_Endpoint.cpp @@ -100,7 +100,7 @@ TAO_IIOP_Endpoint::TAO_IIOP_Endpoint (const char *host, TAO_IIOP_Endpoint & TAO_IIOP_Endpoint::operator= (const TAO_IIOP_Endpoint &other) { - if (this != &other) + if (this != std::addressof(other)) { this->host_ = other.host_; this->port_ = other.port_; @@ -116,10 +116,6 @@ TAO_IIOP_Endpoint::operator= (const TAO_IIOP_Endpoint &other) return *this; } -TAO_IIOP_Endpoint::~TAO_IIOP_Endpoint () -{ -} - TAO_IIOP_Endpoint::TAO_IIOP_Endpoint (const TAO_IIOP_Endpoint &rhs) : TAO_Endpoint (rhs.tag_, rhs.priority_) , host_ (rhs.host_) diff --git a/TAO/tao/IIOP_Endpoint.h b/TAO/tao/IIOP_Endpoint.h index ca4125a509b..95c4a23b2b7 100644 --- a/TAO/tao/IIOP_Endpoint.h +++ b/TAO/tao/IIOP_Endpoint.h @@ -69,8 +69,7 @@ public: CORBA::Short priority); /// Destructor. - ~TAO_IIOP_Endpoint (); - + ~TAO_IIOP_Endpoint () = default; // = Implementation of abstract TAO_Endpoint methods. See // Endpoint.h for their documentation. |