diff options
author | Johnny Willemsen <jwillemsen@remedy.nl> | 2020-12-08 08:43:38 +0100 |
---|---|---|
committer | Johnny Willemsen <jwillemsen@remedy.nl> | 2020-12-08 08:43:38 +0100 |
commit | ecffd1e315cf811a5a6575843bc0775e81778bb7 (patch) | |
tree | 97db7329f0d87120ac882d0c21797179132bb26a /TAO | |
parent | cfb87b202043d9f6b5532f3e3e4e431f6ced4c0b (diff) | |
download | ATCD-ecffd1e315cf811a5a6575843bc0775e81778bb7.tar.gz |
Replace auto_ptr with unique_ptr
* TAO/orbsvcs/orbsvcs/Event/ECG_CDR_Message_Receiver.cpp:
* TAO/orbsvcs/orbsvcs/FtRtEvent/EventChannel/AMI_Replication_Strategy.cpp:
* TAO/orbsvcs/orbsvcs/FtRtEvent/EventChannel/FTEC_Group_Manager.cpp:
* TAO/orbsvcs/orbsvcs/FtRtEvent/EventChannel/Replication_Service.cpp:
* TAO/orbsvcs/orbsvcs/IFRService/IFR_Service_Utils.cpp:
* TAO/orbsvcs/orbsvcs/Log/EventLogFactory_i.cpp:
* TAO/orbsvcs/orbsvcs/Log/Hash_LogStore.cpp:
* TAO/orbsvcs/orbsvcs/Log/RTEventLogFactory_i.cpp:
* TAO/orbsvcs/orbsvcs/Notify/ETCL_Filter.cpp:
* TAO/orbsvcs/orbsvcs/Notify/EventChannelFactory.cpp:
* TAO/orbsvcs/orbsvcs/Notify/XML_Loader.cpp:
* TAO/orbsvcs/orbsvcs/PortableGroup/PG_FactoryRegistry.cpp:
* TAO/orbsvcs/orbsvcs/PortableGroup/PG_ObjectGroupManager.cpp:
* TAO/orbsvcs/orbsvcs/SSLIOP/SSLIOP_ORBInitializer.cpp:
* TAO/orbsvcs/orbsvcs/Trader/Trading_Loader.cpp:
Diffstat (limited to 'TAO')
15 files changed, 23 insertions, 21 deletions
diff --git a/TAO/orbsvcs/orbsvcs/Event/ECG_CDR_Message_Receiver.cpp b/TAO/orbsvcs/orbsvcs/Event/ECG_CDR_Message_Receiver.cpp index 7115d407a11..1b821713e6a 100644 --- a/TAO/orbsvcs/orbsvcs/Event/ECG_CDR_Message_Receiver.cpp +++ b/TAO/orbsvcs/orbsvcs/Event/ECG_CDR_Message_Receiver.cpp @@ -488,7 +488,7 @@ TAO_ECG_CDR_Message_Receiver::get_source_entry (const ACE_INET_Addr &from) ACE_NEW_RETURN (requests, Requests, 0); - auto_ptr<Requests> requests_aptr (requests); + unique_ptr<Requests> requests_aptr (requests); if (requests->init (this->max_requests_, this->min_purge_count_) == -1 || this->request_map_.bind (from, requests, entry) == -1) diff --git a/TAO/orbsvcs/orbsvcs/FtRtEvent/EventChannel/AMI_Replication_Strategy.cpp b/TAO/orbsvcs/orbsvcs/FtRtEvent/EventChannel/AMI_Replication_Strategy.cpp index 8a8416ab398..fb6f26942a8 100644 --- a/TAO/orbsvcs/orbsvcs/FtRtEvent/EventChannel/AMI_Replication_Strategy.cpp +++ b/TAO/orbsvcs/orbsvcs/FtRtEvent/EventChannel/AMI_Replication_Strategy.cpp @@ -38,7 +38,7 @@ AMI_Replication_Strategy::make_primary_strategy() { AMI_Primary_Replication_Strategy* result; ACE_NEW_RETURN(result, AMI_Primary_Replication_Strategy(mt_), 0); - auto_ptr<AMI_Primary_Replication_Strategy> holder(result); + unique_ptr<AMI_Primary_Replication_Strategy> holder(result); if (result->activate() == 0) return holder.release(); return 0; diff --git a/TAO/orbsvcs/orbsvcs/FtRtEvent/EventChannel/FTEC_Group_Manager.cpp b/TAO/orbsvcs/orbsvcs/FtRtEvent/EventChannel/FTEC_Group_Manager.cpp index f1c24c01f4d..51f5031d3c6 100644 --- a/TAO/orbsvcs/orbsvcs/FtRtEvent/EventChannel/FTEC_Group_Manager.cpp +++ b/TAO/orbsvcs/orbsvcs/FtRtEvent/EventChannel/FTEC_Group_Manager.cpp @@ -116,7 +116,7 @@ void TAO_FTEC_Group_Manager::add_member ( TAO_FTRTEC::Log(1, ACE_TEXT("add_member location = <%s>\n"), (const char*)info.the_location[0].id); - auto_ptr<TAO_FTEC_Group_Manager_Impl> new_impl(new TAO_FTEC_Group_Manager_Impl); + unique_ptr<TAO_FTEC_Group_Manager_Impl> new_impl(new TAO_FTEC_Group_Manager_Impl); new_impl->my_position = impl_->my_position; size_t pos = impl_->info_list.length(); diff --git a/TAO/orbsvcs/orbsvcs/FtRtEvent/EventChannel/Replication_Service.cpp b/TAO/orbsvcs/orbsvcs/FtRtEvent/EventChannel/Replication_Service.cpp index 9f43f278154..77ed900759c 100644 --- a/TAO/orbsvcs/orbsvcs/FtRtEvent/EventChannel/Replication_Service.cpp +++ b/TAO/orbsvcs/orbsvcs/FtRtEvent/EventChannel/Replication_Service.cpp @@ -15,7 +15,7 @@ TAO_BEGIN_VERSIONED_NAMESPACE_DECL namespace FTRTEC { namespace { - auto_ptr<Replication_Strategy> replication_strategy; + unique_ptr<Replication_Strategy> replication_strategy; int threads = 1; Replication_Service* service; } diff --git a/TAO/orbsvcs/orbsvcs/IFRService/IFR_Service_Utils.cpp b/TAO/orbsvcs/orbsvcs/IFRService/IFR_Service_Utils.cpp index 09f75725f10..5f697d61847 100644 --- a/TAO/orbsvcs/orbsvcs/IFRService/IFR_Service_Utils.cpp +++ b/TAO/orbsvcs/orbsvcs/IFRService/IFR_Service_Utils.cpp @@ -279,7 +279,7 @@ TAO_IFR_Server::create_repository (void) CORBA::NO_MEMORY () ); - auto_ptr<TAO_ComponentRepository_i> safety (impl); + unique_ptr<TAO_ComponentRepository_i> safety (impl); TAO_IFR_Service_Utils::repo_ = impl; POA_CORBA::ComponentIR::Repository_tie<TAO_ComponentRepository_i> *impl_tie = 0; diff --git a/TAO/orbsvcs/orbsvcs/Log/EventLogFactory_i.cpp b/TAO/orbsvcs/orbsvcs/Log/EventLogFactory_i.cpp index bad86505f10..2784a69e1c7 100644 --- a/TAO/orbsvcs/orbsvcs/Log/EventLogFactory_i.cpp +++ b/TAO/orbsvcs/orbsvcs/Log/EventLogFactory_i.cpp @@ -45,7 +45,7 @@ TAO_EventLogFactory_i::init (PortableServer::POA_ptr /* poa */) CosEventChannelAdmin::EventChannel_var ec_return; - auto_ptr <TAO_CEC_EventChannel> ec (impl); + unique_ptr <TAO_CEC_EventChannel> ec (impl); PortableServer::ObjectId_var oid = this->poa_->activate_object (ec.get ()); diff --git a/TAO/orbsvcs/orbsvcs/Log/Hash_LogStore.cpp b/TAO/orbsvcs/orbsvcs/Log/Hash_LogStore.cpp index 1cbfed1dc8c..53017616b8e 100644 --- a/TAO/orbsvcs/orbsvcs/Log/Hash_LogStore.cpp +++ b/TAO/orbsvcs/orbsvcs/Log/Hash_LogStore.cpp @@ -168,7 +168,7 @@ TAO_Hash_LogStore::create(DsLogAdmin::LogFullActionType full_action, ), CORBA::NO_MEMORY ()); - auto_ptr<TAO_Hash_LogRecordStore> recordstore (impl); + unique_ptr<TAO_Hash_LogRecordStore> recordstore (impl); if (this->hash_map_.bind (id, recordstore.get ()) != 0) { @@ -205,7 +205,7 @@ TAO_Hash_LogStore::create_with_id (DsLogAdmin::LogId id, ), CORBA::NO_MEMORY ()); - auto_ptr<TAO_Hash_LogRecordStore> recordstore (impl); + unique_ptr<TAO_Hash_LogRecordStore> recordstore (impl); if (this->hash_map_.bind (id, recordstore.get ()) != 0) { diff --git a/TAO/orbsvcs/orbsvcs/Log/RTEventLogFactory_i.cpp b/TAO/orbsvcs/orbsvcs/Log/RTEventLogFactory_i.cpp index ffe4ebc38af..c93fdbad60e 100644 --- a/TAO/orbsvcs/orbsvcs/Log/RTEventLogFactory_i.cpp +++ b/TAO/orbsvcs/orbsvcs/Log/RTEventLogFactory_i.cpp @@ -46,7 +46,7 @@ TAO_RTEventLogFactory_i::init (CORBA::ORB_ptr orb, TAO_EC_Event_Channel (attr), CORBA::NO_MEMORY ()); - auto_ptr <TAO_EC_Event_Channel> ec (impl); + unique_ptr <TAO_EC_Event_Channel> ec (impl); impl->activate (); diff --git a/TAO/orbsvcs/orbsvcs/Notify/ETCL_Filter.cpp b/TAO/orbsvcs/orbsvcs/Notify/ETCL_Filter.cpp index b9a8c147a14..2c6663f2621 100644 --- a/TAO/orbsvcs/orbsvcs/Notify/ETCL_Filter.cpp +++ b/TAO/orbsvcs/orbsvcs/Notify/ETCL_Filter.cpp @@ -147,7 +147,7 @@ TAO_Notify_ETCL_Filter::add_constraint_i (CosNotifyFilter::ConstraintID cnstr_id ACE_NEW_THROW_EX (notify_constr_expr, TAO_Notify_Constraint_Expr (), CORBA::NO_MEMORY ()); - auto_ptr <TAO_Notify_Constraint_Expr> auto_expr (notify_constr_expr); + unique_ptr <TAO_Notify_Constraint_Expr> auto_expr (notify_constr_expr); if (TAO_debug_level > 1) ORBSVCS_DEBUG ((LM_DEBUG, @@ -172,7 +172,7 @@ TAO_Notify_ETCL_Filter::add_constraint_i ACE_NEW_THROW_EX (notify_constr_expr, TAO_Notify_Constraint_Expr (), CORBA::NO_MEMORY ()); - auto_ptr <TAO_Notify_Constraint_Expr> auto_expr (notify_constr_expr); + unique_ptr <TAO_Notify_Constraint_Expr> auto_expr (notify_constr_expr); CosNotifyFilter::ConstraintExp const & expr = constraint.constraint_expression; diff --git a/TAO/orbsvcs/orbsvcs/Notify/EventChannelFactory.cpp b/TAO/orbsvcs/orbsvcs/Notify/EventChannelFactory.cpp index a51e3da7ba7..f4e55c7ff8c 100644 --- a/TAO/orbsvcs/orbsvcs/Notify/EventChannelFactory.cpp +++ b/TAO/orbsvcs/orbsvcs/Notify/EventChannelFactory.cpp @@ -228,7 +228,7 @@ TAO_Notify_EventChannelFactory::load_topology (void) if (this->topology_factory_ != 0) { // create_loader will open and load the persistence file for validation - auto_ptr<TAO_Notify::Topology_Loader> tl(this->topology_factory_->create_loader()); + unique_ptr<TAO_Notify::Topology_Loader> tl(this->topology_factory_->create_loader()); if (tl.get () != 0) { tl->load (this); @@ -351,7 +351,7 @@ TAO_Notify_EventChannelFactory::change_to_parent (void) ACE_GUARD_THROW_EX (TAO_SYNCH_MUTEX, ace_mon, this->topology_save_lock_, CORBA::INTERNAL ()); if (seq == this->topology_save_seq_) { - auto_ptr<TAO_Notify::Topology_Saver> saver(this->topology_factory_->create_saver()); + unique_ptr<TAO_Notify::Topology_Saver> saver(this->topology_factory_->create_saver()); if (saver.get() != 0) { this->save_persistent(*saver); diff --git a/TAO/orbsvcs/orbsvcs/Notify/XML_Loader.cpp b/TAO/orbsvcs/orbsvcs/Notify/XML_Loader.cpp index 5285d07672b..2684d93306f 100644 --- a/TAO/orbsvcs/orbsvcs/Notify/XML_Loader.cpp +++ b/TAO/orbsvcs/orbsvcs/Notify/XML_Loader.cpp @@ -77,7 +77,7 @@ namespace TAO_Notify if (result) { this->live_ = false; - auto_ptr<ACEXML_FileCharStream> fstm (new ACEXML_FileCharStream); + unique_ptr<ACEXML_FileCharStream> fstm (new ACEXML_FileCharStream); // xml input source will take ownership if (fstm->open (this->file_name_.c_str ()) == 0) @@ -127,7 +127,7 @@ namespace TAO_Notify ACE_ASSERT (root != 0); this->live_ = true; - auto_ptr<ACEXML_FileCharStream> fstm (new ACEXML_FileCharStream); + unique_ptr<ACEXML_FileCharStream> fstm (new ACEXML_FileCharStream); // xml input source will take ownership if (fstm->open (this->file_name_.c_str ()) == 0) diff --git a/TAO/orbsvcs/orbsvcs/PortableGroup/PG_FactoryRegistry.cpp b/TAO/orbsvcs/orbsvcs/PortableGroup/PG_FactoryRegistry.cpp index 87f2526b88c..6bdd8ff3b94 100644 --- a/TAO/orbsvcs/orbsvcs/PortableGroup/PG_FactoryRegistry.cpp +++ b/TAO/orbsvcs/orbsvcs/PortableGroup/PG_FactoryRegistry.cpp @@ -284,7 +284,7 @@ void TAO::PG_FactoryRegistry::register_factory ( METHOD_ENTRY(TAO::PG_FactoryRegistry::register_factory); RoleInfo * role_info = 0; - auto_ptr<RoleInfo> safe_entry; + unique_ptr<RoleInfo> safe_entry; if (this->registry_.find(role, role_info) != 0) { ORBSVCS_DEBUG(( LM_DEBUG, diff --git a/TAO/orbsvcs/orbsvcs/PortableGroup/PG_ObjectGroupManager.cpp b/TAO/orbsvcs/orbsvcs/PortableGroup/PG_ObjectGroupManager.cpp index b1705e94a87..cb18ce6b8ca 100644 --- a/TAO/orbsvcs/orbsvcs/PortableGroup/PG_ObjectGroupManager.cpp +++ b/TAO/orbsvcs/orbsvcs/PortableGroup/PG_ObjectGroupManager.cpp @@ -171,7 +171,7 @@ TAO_PG_ObjectGroupManager::add_member_i ( ENOMEM), CORBA::COMPLETED_NO)); - auto_ptr<TAO_PG_ObjectGroup_Array> safe_groups (groups); + unique_ptr<TAO_PG_ObjectGroup_Array> safe_groups (groups); // This should not fail! if (this->location_map_.bind (the_location, groups) != 0) @@ -490,7 +490,7 @@ TAO_PG_ObjectGroupManager::create_object_group ( ENOMEM), CORBA::COMPLETED_NO)); - auto_ptr<TAO_PG_ObjectGroup_Map_Entry> safe_group_entry (group_entry); + unique_ptr<TAO_PG_ObjectGroup_Map_Entry> safe_group_entry (group_entry); // Set the RepositoryId associated with the created ObjectGroup_Map // entry. diff --git a/TAO/orbsvcs/orbsvcs/SSLIOP/SSLIOP_ORBInitializer.cpp b/TAO/orbsvcs/orbsvcs/SSLIOP/SSLIOP_ORBInitializer.cpp index 58d9e0e5078..87067baf08a 100644 --- a/TAO/orbsvcs/orbsvcs/SSLIOP/SSLIOP_ORBInitializer.cpp +++ b/TAO/orbsvcs/orbsvcs/SSLIOP/SSLIOP_ORBInitializer.cpp @@ -169,7 +169,7 @@ TAO::SSLIOP::ORBInitializer::post_init ( TAO::SSLIOP::CredentialsAcquirerFactory, CORBA::NO_MEMORY ()); - auto_ptr<TAO::SSLIOP::CredentialsAcquirerFactory> safe_factory; + unique_ptr<TAO::SSLIOP::CredentialsAcquirerFactory> safe_factory; tao_curator->register_acquirer_factory ("SL3TLS", factory); diff --git a/TAO/orbsvcs/orbsvcs/Trader/Trading_Loader.cpp b/TAO/orbsvcs/orbsvcs/Trader/Trading_Loader.cpp index c321b73ab89..7c8de9c5ea5 100644 --- a/TAO/orbsvcs/orbsvcs/Trader/Trading_Loader.cpp +++ b/TAO/orbsvcs/orbsvcs/Trader/Trading_Loader.cpp @@ -16,6 +16,8 @@ #include "orbsvcs/Log_Macros.h" #include "orbsvcs/Trader/Trading_Loader.h" +#include <utility> + #include "orbsvcs/Daemon_Utilities.h" #include "tao/ORB_Core.h" @@ -198,9 +200,9 @@ TAO_Trading_Loader::create_object (CORBA::ORB_ptr orb_ptr, this->orb_manager_.activate_poa_manager (); // Create a Trader Object and set its Service Type Repository. - auto_ptr<TAO_Trader_Factory::TAO_TRADER> auto_trader (TAO_Trader_Factory::create_trader (argc, argv)); + unique_ptr<TAO_Trader_Factory::TAO_TRADER> auto_trader (TAO_Trader_Factory::create_trader (argc, argv)); - this->trader_ = auto_trader; + this->trader_ = std::move(auto_trader); TAO_Support_Attributes_i &sup_attr = this->trader_->support_attributes (); |