summaryrefslogtreecommitdiff
path: root/TAO/tao
diff options
context:
space:
mode:
authorJohnny Willemsen <jwillemsen@remedy.nl>2021-09-26 19:10:02 +0200
committerJohnny Willemsen <jwillemsen@remedy.nl>2021-09-26 19:10:02 +0200
commitad7a6707a41f88f8fdf043cfc44f8674698880f0 (patch)
tree4bbb35e047ed1d561947b5df32be323b32ec6dd4 /TAO/tao
parent27010649539be8117b37516080a7091969a4b03a (diff)
downloadATCD-ad7a6707a41f88f8fdf043cfc44f8674698880f0.tar.gz
Use std::unique_ptr and default
* ACE/ace/INET_Addr.cpp: * ACE/ace/Parse_Node.h: * ACE/ace/Service_Gestalt.cpp: * ACE/ace/TLI.cpp: * ACE/ace/Thread_Manager.cpp: * ACE/ace/UUID.cpp: * ACE/ace/UUID.h: * ACE/ace/WFMO_Reactor.cpp: * ACE/tests/CDR_File_Test.cpp: * TAO/orbsvcs/DevGuideExamples/EventServices/RTEC_MCast_Federated/EchoEventSupplierMain.cpp: * TAO/orbsvcs/examples/CosEC/Factory/CosEventChannelFactory_i.cpp: * TAO/orbsvcs/examples/CosEC/Factory/CosEventChannelFactory_i.h: * TAO/orbsvcs/examples/CosEC/Factory/FactoryDriver.cpp: * TAO/orbsvcs/examples/CosEC/Factory/FactoryDriver.h: * TAO/orbsvcs/examples/CosEC/Factory/README: * TAO/orbsvcs/examples/CosEC/RtEC_Based/lib/ConsumerAdmin_i.cpp: * TAO/orbsvcs/examples/CosEC/RtEC_Based/lib/ConsumerAdmin_i.h: * TAO/orbsvcs/examples/CosEC/RtEC_Based/lib/CosEvent_Utilities.cpp: * TAO/orbsvcs/examples/CosEC/RtEC_Based/lib/CosEvent_Utilities.h: * TAO/orbsvcs/examples/CosEC/RtEC_Based/lib/EventChannel_i.cpp: * TAO/orbsvcs/examples/CosEC/RtEC_Based/lib/EventChannel_i.h: * TAO/orbsvcs/examples/CosEC/RtEC_Based/lib/ProxyPushConsumer_i.cpp: * TAO/orbsvcs/examples/CosEC/RtEC_Based/lib/ProxyPushSupplier_i.cpp: * TAO/orbsvcs/examples/CosEC/RtEC_Based/lib/ProxyPushSupplier_i.h: * TAO/orbsvcs/examples/CosEC/RtEC_Based/lib/SupplierAdmin_i.cpp: * TAO/orbsvcs/examples/CosEC/RtEC_Based/lib/SupplierAdmin_i.h: * TAO/orbsvcs/orbsvcs/FtRtEvent/EventChannel/Fault_Detector_Loader.cpp: * TAO/orbsvcs/orbsvcs/FtRtEvent/EventChannel/Replication_Service.cpp: * TAO/orbsvcs/orbsvcs/PortableGroup/PG_FactoryRegistry.cpp: * TAO/orbsvcs/orbsvcs/PortableGroup/PG_Object_Group_Storable.cpp: * TAO/orbsvcs/performance-tests/RTEvent/lib/Control.cpp: * TAO/orbsvcs/performance-tests/RTEvent/lib/Low_Priority_Setup.cpp: * TAO/orbsvcs/tests/Event/Mcast/RTEC_MCast_Federated/EchoEventConsumer_i.cpp: * TAO/orbsvcs/tests/Event/Mcast/RTEC_MCast_Federated/EchoEventConsumer_i.h: * TAO/orbsvcs/tests/Event/Mcast/RTEC_MCast_Federated/EchoEventSupplierMain.cpp: * TAO/orbsvcs/tests/Event/Mcast/RTEC_MCast_Federated/EchoEventSupplier_i.cpp: * TAO/orbsvcs/tests/Event/Mcast/RTEC_MCast_Federated/EchoEventSupplier_i.h: * TAO/orbsvcs/tests/Event/Mcast/RTEC_MCast_Federated/README: * TAO/orbsvcs/tests/Notify/Blocking/Structured_Supplier.cpp: * TAO/orbsvcs/tests/Notify/Bug_1385_Regression/Structured_Supplier.cpp: * TAO/orbsvcs/tests/Notify/Bug_2415_Regression/Supplier.cpp: * TAO/orbsvcs/tests/Notify/Bug_2561_Regression/Supplier.cpp: * TAO/orbsvcs/tests/Notify/Discarding/Sequence_Supplier.cpp: * TAO/orbsvcs/tests/Notify/Discarding/Structured_Supplier.cpp: * TAO/orbsvcs/tests/Notify/MT_Dispatching/Structured_Supplier.cpp: * TAO/orbsvcs/tests/Notify/Ordering/Sequence_Supplier.cpp: * TAO/orbsvcs/tests/Notify/Ordering/Structured_Supplier.cpp: * TAO/orbsvcs/tests/Notify/Persistent_POA/Structured_Supplier.cpp: * TAO/orbsvcs/tests/Notify/Sequence_Multi_ETCL_Filter/Sequence_Supplier.cpp: * TAO/orbsvcs/tests/Notify/Sequence_Multi_Filter/Sequence_Supplier.cpp: * TAO/orbsvcs/tests/Notify/Structured_Filter/Structured_Supplier.cpp: * TAO/orbsvcs/tests/Notify/Structured_Multi_Filter/Structured_Supplier.cpp: * TAO/orbsvcs/tests/Notify/performance-tests/Filter/Sequence_Supplier.cpp: * TAO/orbsvcs/tests/Notify/performance-tests/Filter/Structured_Supplier.cpp: * TAO/tao/IORManipulation/IORManipulation.cpp: * TAO/tao/Leader_Follower.cpp: * TAO/tao/Load_Protocol_Factory_T.h: * TAO/tao/ORB_Core.cpp: * TAO/tao/PortableServer/ServantRetentionStrategyRetain.cpp: * TAO/tao/default_resource.cpp: * TAO/tests/Oneway_Send_Timeouts/Server.cpp: * TAO/tests/Storable/Savable.cpp:
Diffstat (limited to 'TAO/tao')
-rw-r--r--TAO/tao/IORManipulation/IORManipulation.cpp6
-rw-r--r--TAO/tao/Leader_Follower.cpp5
-rw-r--r--TAO/tao/Load_Protocol_Factory_T.h3
-rw-r--r--TAO/tao/ORB_Core.cpp5
-rw-r--r--TAO/tao/PortableServer/ServantRetentionStrategyRetain.cpp2
-rw-r--r--TAO/tao/default_resource.cpp5
6 files changed, 13 insertions, 13 deletions
diff --git a/TAO/tao/IORManipulation/IORManipulation.cpp b/TAO/tao/IORManipulation/IORManipulation.cpp
index 8eac641e59e..4f6772fd90d 100644
--- a/TAO/tao/IORManipulation/IORManipulation.cpp
+++ b/TAO/tao/IORManipulation/IORManipulation.cpp
@@ -55,8 +55,7 @@ TAO_IOR_Manipulation_impl::merge_iors (
for (i = 1; i < iors.length () ; i++)
{
// this gets a copy of the MProfile, hence the auto_ptr;
- ACE_auto_ptr_reset (tmp_pfiles,
- iors[i]->_stubobj ()->make_profiles ());
+ tmp_pfiles.reset (iors[i]->_stubobj ()->make_profiles ());
// check to see if any of the profiles in tmp_pfiles are already
// in Merged_Profiles. If so raise exception.
@@ -183,8 +182,7 @@ TAO_IOR_Manipulation_impl::remove_profiles (
// Now we can remove the profiles which we want to eliminate from
// the Object.
- ACE_auto_ptr_reset (tmp_pfiles,
- ior2->_stubobj ()->make_profiles ());
+ tmp_pfiles.reset (ior2->_stubobj ()->make_profiles ());
TAO_MProfile& mp = stub -> base_profiles();
if (mp.remove_profiles (tmp_pfiles.get ()) < 0)
diff --git a/TAO/tao/Leader_Follower.cpp b/TAO/tao/Leader_Follower.cpp
index 7baf6687771..8ba45c8dab6 100644
--- a/TAO/tao/Leader_Follower.cpp
+++ b/TAO/tao/Leader_Follower.cpp
@@ -1,6 +1,5 @@
#include "ace/OS_NS_sys_time.h"
#include "ace/Reactor.h"
-#include "ace/Auto_Ptr.h"
#include "tao/Leader_Follower.h"
#include "tao/LF_Follower_Auto_Ptr.h"
@@ -12,6 +11,8 @@
#include "tao/ORB_Core.h"
#include "tao/ORB_Time_Policy.h"
+#include <memory>
+
#if !defined (__ACE_INLINE__)
# include "tao/Leader_Follower.inl"
#endif /* ! __ACE_INLINE__ */
@@ -225,7 +226,7 @@ TAO_Leader_Follower::resume_events ()
// not need to obtain the lock, only called when holding the lock
while (!this->deferred_event_set_.is_empty ())
{
- ACE_Auto_Ptr<Deferred_Event> event (this->deferred_event_set_.pop_front ());
+ std::unique_ptr<Deferred_Event> event (this->deferred_event_set_.pop_front ());
// Send a notification to the reactor to cause the awakening of a new
// follower, if there is one already available.
ACE_Reactor *reactor = this->orb_core_->reactor ();
diff --git a/TAO/tao/Load_Protocol_Factory_T.h b/TAO/tao/Load_Protocol_Factory_T.h
index af0c7f18731..5928452f5d3 100644
--- a/TAO/tao/Load_Protocol_Factory_T.h
+++ b/TAO/tao/Load_Protocol_Factory_T.h
@@ -58,8 +58,7 @@ namespace TAO
T,
-1);
- ACE_auto_ptr_reset (safe_protocol_factory,
- protocol_factory);
+ safe_protocol_factory.reset (protocol_factory);
transfer_ownership = true;
}
diff --git a/TAO/tao/ORB_Core.cpp b/TAO/tao/ORB_Core.cpp
index 4073819bfd0..a2519a100f3 100644
--- a/TAO/tao/ORB_Core.cpp
+++ b/TAO/tao/ORB_Core.cpp
@@ -66,6 +66,7 @@
#include "ace/OS_NS_string.h"
#include "ace/Message_Block.h"
#include <cstring>
+#include <memory>
#if TAO_HAS_INTERCEPTORS == 1
# include "tao/ClientRequestInterceptor_Adapter.h"
@@ -2761,7 +2762,7 @@ TAO_ORB_Core::resolve_ior_table_i ()
if (factory != nullptr)
{
- ACE_Auto_Ptr <TAO_Adapter> iortable_adapter (factory->create (this));
+ std::unique_ptr <TAO_Adapter> iortable_adapter (factory->create (this));
iortable_adapter->open ();
CORBA::Object_var tmp_root = iortable_adapter->root ();
@@ -2795,7 +2796,7 @@ TAO_ORB_Core::resolve_async_ior_table_i ()
if (factory != nullptr)
{
- ACE_Auto_Ptr <TAO_Adapter> iortable_adapter (factory->create (this));
+ std::unique_ptr <TAO_Adapter> iortable_adapter (factory->create (this));
iortable_adapter->open ();
CORBA::Object_var tmp_root = iortable_adapter->root ();
diff --git a/TAO/tao/PortableServer/ServantRetentionStrategyRetain.cpp b/TAO/tao/PortableServer/ServantRetentionStrategyRetain.cpp
index b92e56025cc..efcd7935078 100644
--- a/TAO/tao/PortableServer/ServantRetentionStrategyRetain.cpp
+++ b/TAO/tao/PortableServer/ServantRetentionStrategyRetain.cpp
@@ -47,7 +47,7 @@ namespace TAO
poa->orb_core().server_factory ()->active_object_map_creation_parameters ()
), CORBA::NO_MEMORY ());
- ACE_auto_ptr_reset (this->active_object_map_, active_object_map);
+ this->active_object_map_.reset (active_object_map);
#if defined (TAO_HAS_MONITOR_POINTS) && (TAO_HAS_MONITOR_POINTS == 1)
ACE_CString name_str ("Active_Object_Map_");
diff --git a/TAO/tao/default_resource.cpp b/TAO/tao/default_resource.cpp
index cee00e985c0..e51280730e5 100644
--- a/TAO/tao/default_resource.cpp
+++ b/TAO/tao/default_resource.cpp
@@ -27,6 +27,8 @@
#include "ace/OS_NS_string.h"
#include "ace/OS_NS_strings.h"
+#include <memory>
+
#if !defined (__ACE_INLINE__)
#include "tao/default_resource.inl"
#endif /* __ACE_INLINE__ */
@@ -1192,7 +1194,7 @@ TAO_Default_Resource_Factory::codeset_manager()
}
- ACE_Auto_Ptr<TAO_Codeset_Manager> safemgr (mgr);
+ std::unique_ptr<TAO_Codeset_Manager> safemgr (mgr);
if (TAO_debug_level >= 1)
TAOLIB_DEBUG ((LM_DEBUG,
@@ -1203,7 +1205,6 @@ TAO_Default_Resource_Factory::codeset_manager()
this->wchar_codeset_parameters_.apply_to (mgr->wchar_codeset_descriptor());
return safemgr.release ();
-
}
TAO_Resource_Factory::Resource_Usage