diff options
author | Johnny Willemsen <jwillemsen@remedy.nl> | 2021-09-26 19:10:02 +0200 |
---|---|---|
committer | Johnny Willemsen <jwillemsen@remedy.nl> | 2021-09-26 19:10:02 +0200 |
commit | ad7a6707a41f88f8fdf043cfc44f8674698880f0 (patch) | |
tree | 4bbb35e047ed1d561947b5df32be323b32ec6dd4 /ACE | |
parent | 27010649539be8117b37516080a7091969a4b03a (diff) | |
download | ATCD-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 'ACE')
-rw-r--r-- | ACE/ace/INET_Addr.cpp | 2 | ||||
-rw-r--r-- | ACE/ace/Parse_Node.h | 6 | ||||
-rw-r--r-- | ACE/ace/Service_Gestalt.cpp | 10 | ||||
-rw-r--r-- | ACE/ace/TLI.cpp | 9 | ||||
-rw-r--r-- | ACE/ace/Thread_Manager.cpp | 4 | ||||
-rw-r--r-- | ACE/ace/UUID.cpp | 1 | ||||
-rw-r--r-- | ACE/ace/UUID.h | 4 | ||||
-rw-r--r-- | ACE/ace/WFMO_Reactor.cpp | 2 | ||||
-rw-r--r-- | ACE/tests/CDR_File_Test.cpp | 3 |
9 files changed, 18 insertions, 23 deletions
diff --git a/ACE/ace/INET_Addr.cpp b/ACE/ace/INET_Addr.cpp index 6afe61038f2..505b52a8ef5 100644 --- a/ACE/ace/INET_Addr.cpp +++ b/ACE/ace/INET_Addr.cpp @@ -1098,7 +1098,7 @@ ACE_INET_Addr::get_ip_address () const if (this->get_type () == AF_INET6) { if (IN6_IS_ADDR_V4MAPPED (&this->inet_addr_.in6_.sin6_addr) || - IN6_IS_ADDR_V4COMPAT (&this->inet_addr_.in6_.sin6_addr) ) + IN6_IS_ADDR_V4COMPAT (&this->inet_addr_.in6_.sin6_addr)) { ACE_UINT32 addr; // Return the last 32 bits of the address diff --git a/ACE/ace/Parse_Node.h b/ACE/ace/Parse_Node.h index 7d282a38601..89217ff9dea 100644 --- a/ACE/ace/Parse_Node.h +++ b/ACE/ace/Parse_Node.h @@ -21,10 +21,10 @@ #if (ACE_USES_CLASSIC_SVC_CONF == 1) -#include "ace/Auto_Ptr.h" #include "ace/DLL.h" #include "ace/SString.h" #include "ace/Svc_Conf.h" +#include <memory> ACE_BEGIN_VERSIONED_NAMESPACE_DECL @@ -222,7 +222,7 @@ public: private: /// Pointer to a descriptor that describes this node. - ACE_Auto_Ptr<const ACE_Service_Type_Factory> factory_; + std::unique_ptr<const ACE_Service_Type_Factory> factory_; private: ACE_Dynamic_Node (const ACE_Dynamic_Node&) = delete; @@ -505,7 +505,7 @@ private: private: ACE_TString name_; int type_; - ACE_Auto_Ptr<ACE_Location_Node> location_; + std::unique_ptr<ACE_Location_Node> location_; bool const is_active_; }; diff --git a/ACE/ace/Service_Gestalt.cpp b/ACE/ace/Service_Gestalt.cpp index 24ab2a8578c..202676b4ba4 100644 --- a/ACE/ace/Service_Gestalt.cpp +++ b/ACE/ace/Service_Gestalt.cpp @@ -21,11 +21,10 @@ #include "ace/OS_NS_time.h" #include "ace/OS_NS_unistd.h" #include "ace/OS_NS_sys_stat.h" - #include "ace/TSS_T.h" #include "ace/Service_Gestalt.h" - #include "ace/Svc_Conf_Param.h" +#include <memory> ACE_BEGIN_VERSIONED_NAMESPACE_DECL @@ -557,7 +556,7 @@ ACE_Service_Gestalt::initialize (const ACE_Service_Type_Factory *stf, // make_service_type() is doing the dynamic loading and also runs // any static initializers - ACE_Auto_Ptr<ACE_Service_Type> tmp (stf->make_service_type (this)); + std::unique_ptr<ACE_Service_Type> tmp (stf->make_service_type (this)); if (tmp.get () != 0 && this->initialize_i (tmp.get (), parameters) == 0) @@ -914,7 +913,7 @@ ACE_Service_Gestalt::process_file (const ACE_TCHAR file[]) #else ACE_DLL dll; - auto_ptr<ACE_XML_Svc_Conf> xml_svc_conf (this->get_xml_svc_conf (dll)); + std::unique_ptr<ACE_XML_Svc_Conf> xml_svc_conf (this->get_xml_svc_conf (dll)); if (xml_svc_conf.get () == 0) return -1; @@ -945,8 +944,7 @@ ACE_Service_Gestalt::process_directive (const ACE_TCHAR directive[]) #else ACE_DLL dll; - auto_ptr<ACE_XML_Svc_Conf> - xml_svc_conf (this->get_xml_svc_conf (dll)); + std::unqiue_ptr<ACE_XML_Svc_Conf> xml_svc_conf (this->get_xml_svc_conf (dll)); if (xml_svc_conf.get () == 0) return -1; diff --git a/ACE/ace/TLI.cpp b/ACE/ace/TLI.cpp index 7766b7e4204..72489c64a30 100644 --- a/ACE/ace/TLI.cpp +++ b/ACE/ace/TLI.cpp @@ -7,6 +7,7 @@ #include "ace/OS_NS_string.h" #include "ace/OS_NS_sys_socket.h" #include "ace/Auto_Ptr.h" +#include <memory> #if defined (ACE_HAS_TLI) @@ -125,7 +126,7 @@ ACE_TLI::set_option (int level, int option, void *optval, int optlen) struct t_optmgmt req, ret; ACE_NEW_RETURN (req.opt.buf, char[sizeof (struct t_opthdr) + optlen], -1); # if (_XOPEN_SOURCE - 0 >= 500) - auto_ptr<char> req_opt_buf_p (reinterpret_cast<char*> (req.opt.buf)); + std::unique_ptr<char> req_opt_buf_p (reinterpret_cast<char*> (req.opt.buf)); # else ACE_Auto_Array_Ptr<char> req_opt_buf_p (req.opt.buf); # endif /* XPG5 vs XPG4 */ @@ -133,7 +134,7 @@ ACE_TLI::set_option (int level, int option, void *optval, int optlen) reinterpret_cast<struct t_opthdr *> (req.opt.buf); ACE_NEW_RETURN (ret.opt.buf, char[sizeof (struct t_opthdr) + optlen], -1); # if (_XOPEN_SOURCE - 0 >= 500) - auto_ptr<char> ret_opt_buf_p (reinterpret_cast<char*> (ret.opt.buf)); + std::unique_ptr<char> ret_opt_buf_p (reinterpret_cast<char*> (ret.opt.buf)); # else ACE_Auto_Array_Ptr<char> ret_opt_buf_p (ret.opt.buf); # endif /* XPG5 vs XPG4 */ @@ -190,7 +191,7 @@ ACE_TLI::get_option (int level, int option, void *optval, int &optlen) struct t_optmgmt req, ret; ACE_NEW_RETURN (req.opt.buf, char[sizeof (struct t_opthdr)], -1); # if (_XOPEN_SOURCE - 0 >= 500) - auto_ptr<char> req_opt_buf_p (reinterpret_cast<char*> (req.opt.buf)); + std::unique_ptr<char> req_opt_buf_p (reinterpret_cast<char*> (req.opt.buf)); # else ACE_Auto_Array_Ptr<char> req_opt_buf_p (req.opt.buf); # endif /* XPG5 vs XPG4 */ @@ -198,7 +199,7 @@ ACE_TLI::get_option (int level, int option, void *optval, int &optlen) reinterpret_cast<struct t_opthdr *> (req.opt.buf); ACE_NEW_RETURN (ret.opt.buf, char[sizeof (struct t_opthdr) + optlen], -1); # if (_XOPEN_SOURCE - 0 >= 500) - auto_ptr<char> ret_opt_buf_p (reinterpret_cast<char*> (ret.opt.buf)); + std::unique_ptr<char> ret_opt_buf_p (reinterpret_cast<char*> (ret.opt.buf)); # else ACE_Auto_Array_Ptr<char> ret_opt_buf_p (ret.opt.buf); # endif /* XPG5 vs XPG4 */ diff --git a/ACE/ace/Thread_Manager.cpp b/ACE/ace/Thread_Manager.cpp index 0c462ad96fb..6b58fa5693e 100644 --- a/ACE/ace/Thread_Manager.cpp +++ b/ACE/ace/Thread_Manager.cpp @@ -3,11 +3,11 @@ #include "ace/Dynamic.h" #include "ace/Object_Manager.h" #include "ace/Singleton.h" -#include "ace/Auto_Ptr.h" #include "ace/Guard_T.h" #include "ace/Time_Value.h" #include "ace/OS_NS_sys_time.h" #include "ace/Truncate.h" +#include <memory> #if !defined (__ACE_INLINE__) #include "ace/Thread_Manager.inl" @@ -1714,7 +1714,7 @@ ACE_Thread_Manager::wait (const ACE_Time_Value *timeout, { ACE_TRACE ("ACE_Thread_Manager::wait"); - ACE_Auto_Ptr<ACE_Time_Value> local_timeout; + std::unique_ptr<ACE_Time_Value> local_timeout; // Check to see if we're using absolute time or not. if (!use_absolute_time && timeout != 0) { diff --git a/ACE/ace/UUID.cpp b/ACE/ace/UUID.cpp index 0b424fd3528..b481c53e301 100644 --- a/ACE/ace/UUID.cpp +++ b/ACE/ace/UUID.cpp @@ -12,6 +12,7 @@ #include "ace/OS_NS_netdb.h" #include "ace/OS_NS_unistd.h" #include "ace/ACE.h" +#include "ace/Auto_Ptr.h" ACE_BEGIN_VERSIONED_NAMESPACE_DECL diff --git a/ACE/ace/UUID.h b/ACE/ace/UUID.h index 3745fc25fdf..38fb413da82 100644 --- a/ACE/ace/UUID.h +++ b/ACE/ace/UUID.h @@ -19,10 +19,10 @@ # pragma once #endif /* ACE_LACKS_PRAGMA_ONCE */ -#include "ace/Auto_Ptr.h" #include "ace/SString.h" #include "ace/Singleton.h" #include "ace/Synch_Traits.h" +#include <memory> ACE_BEGIN_VERSIONED_NAMESPACE_DECL @@ -187,7 +187,7 @@ namespace ACE_Utils /// The string representation of the UUID. This is created and /// updated only on demand. - mutable ACE_Auto_Ptr <ACE_CString> as_string_; + mutable std::unique_ptr <ACE_CString> as_string_; }; /** diff --git a/ACE/ace/WFMO_Reactor.cpp b/ACE/ace/WFMO_Reactor.cpp index 12e9091c26d..db67fa95ce3 100644 --- a/ACE/ace/WFMO_Reactor.cpp +++ b/ACE/ace/WFMO_Reactor.cpp @@ -12,8 +12,6 @@ #include "ace/WFMO_Reactor.inl" #endif /* __ACE_INLINE__ */ -#include "ace/Auto_Ptr.h" - ACE_BEGIN_VERSIONED_NAMESPACE_DECL ACE_WFMO_Reactor_Handler_Repository::ACE_WFMO_Reactor_Handler_Repository (ACE_WFMO_Reactor &wfmo_reactor) diff --git a/ACE/tests/CDR_File_Test.cpp b/ACE/tests/CDR_File_Test.cpp index edc6c8d8fd8..62be7259803 100644 --- a/ACE/tests/CDR_File_Test.cpp +++ b/ACE/tests/CDR_File_Test.cpp @@ -10,7 +10,6 @@ */ //============================================================================= - #include "test_config.h" #include "ace/OS_Memory.h" #include "ace/OS_NS_stdlib.h" @@ -25,8 +24,6 @@ // FUZZ: disable check_for_streams_include #include "ace/streams.h" - - #if !defined (ACE_LACKS_IOSTREAM_TOTALLY) /** |