diff options
author | Johnny Willemsen <jwillemsen@remedy.nl> | 2020-12-30 10:04:46 +0100 |
---|---|---|
committer | Johnny Willemsen <jwillemsen@remedy.nl> | 2020-12-30 10:04:46 +0100 |
commit | 798e611f9f766b587fc2e3c6f8ad6a988f0fa816 (patch) | |
tree | c185b3bce2903e7e557458067ca022d490851031 | |
parent | 31d71bffb2bd36047dd8a8d1110abb8076115b5f (diff) | |
download | ATCD-798e611f9f766b587fc2e3c6f8ad6a988f0fa816.tar.gz |
Make use of std::unique_ptr
* TAO/orbsvcs/tests/Event/Mcast/Common/EC_Wrapper.cpp:
* TAO/orbsvcs/tests/Event/Mcast/Common/EC_Wrapper.h:
* TAO/orbsvcs/tests/Event/Mcast/Common/Gateway_EC.h:
-rw-r--r-- | TAO/orbsvcs/tests/Event/Mcast/Common/EC_Wrapper.cpp | 6 | ||||
-rw-r--r-- | TAO/orbsvcs/tests/Event/Mcast/Common/EC_Wrapper.h | 3 | ||||
-rw-r--r-- | TAO/orbsvcs/tests/Event/Mcast/Common/Gateway_EC.h | 2 |
3 files changed, 3 insertions, 8 deletions
diff --git a/TAO/orbsvcs/tests/Event/Mcast/Common/EC_Wrapper.cpp b/TAO/orbsvcs/tests/Event/Mcast/Common/EC_Wrapper.cpp index 960f03e5911..acfd331e622 100644 --- a/TAO/orbsvcs/tests/Event/Mcast/Common/EC_Wrapper.cpp +++ b/TAO/orbsvcs/tests/Event/Mcast/Common/EC_Wrapper.cpp @@ -1,6 +1,6 @@ #include "EC_Wrapper.h" #include "orbsvcs/Event/EC_Event_Channel.h" -#include "ace/Auto_Ptr.h" +#include <memory> EC_Wrapper::EC_Wrapper (void) : ec_impl_ (0), @@ -53,7 +53,7 @@ EC_Wrapper::init (CORBA::ORB_ptr orb, ACE_NEW_RETURN (impl, TAO_EC_Event_Channel (attr), -1); - auto_ptr<TAO_EC_Event_Channel> impl_release (impl); + std::unique_ptr<TAO_EC_Event_Channel> impl_release (impl); try { @@ -91,7 +91,7 @@ EC_Wrapper::for_suppliers (void) void EC_Wrapper::destroy_ec (void) { - auto_ptr<TAO_EC_Event_Channel> ec_impl_aptr (this->ec_impl_); + std::unique_ptr<TAO_EC_Event_Channel> ec_impl_aptr (this->ec_impl_); this->ec_impl_ = 0; if (ec_impl_aptr.get ()) diff --git a/TAO/orbsvcs/tests/Event/Mcast/Common/EC_Wrapper.h b/TAO/orbsvcs/tests/Event/Mcast/Common/EC_Wrapper.h index 09790573f91..cf73b4bca21 100644 --- a/TAO/orbsvcs/tests/Event/Mcast/Common/EC_Wrapper.h +++ b/TAO/orbsvcs/tests/Event/Mcast/Common/EC_Wrapper.h @@ -26,7 +26,6 @@ class ECMcastTests_Export EC_Wrapper: public TAO_EC_Deactivated_Object { public: - /// Create a new EC_Wrapper object. /// (Constructor access is restricted to insure that all /// EC_Wrapper objects are heap-allocated.) @@ -56,13 +55,11 @@ public: //@} protected: - /// Constructor (protected). Clients can create new /// EC_Wrapper objects using the static create() method. EC_Wrapper (void); private: - /// Helper - destroys Event Channel and deactivate from POA, if /// necessary. void destroy_ec (void); diff --git a/TAO/orbsvcs/tests/Event/Mcast/Common/Gateway_EC.h b/TAO/orbsvcs/tests/Event/Mcast/Common/Gateway_EC.h index bbe81ff8729..455a9149cc9 100644 --- a/TAO/orbsvcs/tests/Event/Mcast/Common/Gateway_EC.h +++ b/TAO/orbsvcs/tests/Event/Mcast/Common/Gateway_EC.h @@ -20,7 +20,6 @@ class ECMcastTests_Export Gateway_EC { public: - /// Constructor. Gateway_EC (void); @@ -29,7 +28,6 @@ public: int run (int argc, ACE_TCHAR ** argv); private: - /// Helpers. //@{ int parse_args (int argc, ACE_TCHAR *argv[]); |