Skip to content

Commit

Permalink
C++17 removes std::auto_ptr so we don't provide the ACE auto_ptr temp…
Browse files Browse the repository at this point in the history
…lates anymore with C++17, use std::unique_ptr as replacement. Updated a lot of examples/tests to not use any ACE auto pointer templates but just std::unique_ptr

    * ACE/ACEXML/common/HttpCharStream.cpp:
    * ACE/ACEXML/common/URL_Addr.cpp:
    * ACE/ACEXML/common/XML_Codecs.cpp:
    * ACE/ACEXML/examples/SAXPrint/main.cpp:
    * ACE/ACEXML/parser/parser/Parser.cpp:
    * ACE/ACEXML/parser/parser/Parser.h:
    * ACE/Kokyu/Default_Dispatcher_Impl.cpp:
    * ACE/Kokyu/Kokyu_defs.h:
    * ACE/Kokyu/tests/DSRT_MIF/MIF.cpp:
    * ACE/ace/ACE.cpp:
    * ACE/ace/Auto_Functor.h:
    * ACE/ace/Auto_Ptr.cpp:
    * ACE/ace/Auto_Ptr.h:
    * ACE/ace/Auto_Ptr.inl:
    * ACE/ace/CDR_Stream.cpp:
    * ACE/ace/DLL_Manager.cpp:
    * ACE/ace/Log_Msg.h:
    * ACE/ace/Pagefile_Memory_Pool.cpp:
    * ACE/ace/Proactor.cpp:
    * ACE/ace/Refcounted_Auto_Ptr.h:
    * ACE/ace/SOCK_SEQPACK_Acceptor.cpp:
    * ACE/ace/SOCK_SEQPACK_Association.cpp:
    * ACE/ace/SString.h:
    * ACE/ace/Service_Gestalt.cpp:
    * ACE/ace/Sock_Connect.cpp:
    * ACE/ace/Svc_Conf_Lexer.cpp:
    * ACE/ace/TLI.cpp:
    * ACE/ace/UUID.cpp:
    * ACE/ace/config-win32-msvc-142.h:
    * ACE/apps/JAWS/clients/Caching/Locator_Request_Reply.cpp:
    * ACE/apps/JAWS/clients/Caching/URL_Properties.cpp:
    * ACE/apps/JAWS/server/JAWS_IO.cpp:
    * ACE/apps/gperf/src/Key_List.cpp:
    * ACE/bin/main2TMAIN.pl:
    * ACE/docs/exceptions.html:
    * ACE/examples/IPC_SAP/UPIPE_SAP/ex2.cpp:
    * ACE/examples/IPC_SAP/UPIPE_SAP/ex3.cpp:
    * ACE/examples/Reactor/WFMO_Reactor/Handle_Close.cpp:
    * ACE/examples/Reactor/WFMO_Reactor/Window_Messages.cpp:
    * ACE/examples/Threads/future1.cpp:
    * ACE/examples/Threads/future2.cpp:
    * ACE/examples/Web_Crawler/HTTP_URL.cpp:
    * ACE/include/makeinclude/platform_linux_icc.GNU:
    * ACE/netsvcs/lib/Name_Handler.cpp:
    * ACE/tests/CDR_File_Test.cpp:
    * ACE/tests/CDR_Test.cpp:
    * ACE/tests/Codecs_Test.cpp:
    * ACE/tests/Compiler_Features_09_Test.cpp:
    * ACE/tests/Conn_Test.cpp:
    * ACE/tests/Future_Set_Test.cpp:
    * ACE/tests/Future_Test.cpp:
    * ACE/tests/Log_Msg_Test.cpp:
    * ACE/tests/Logging_Strategy_Test.cpp:
    * ACE/tests/Message_Queue_Test_Ex.cpp:
    * ACE/tests/Reactor_Fairness_Test.cpp:
    * ACE/tests/Reactor_Performance_Test.cpp:
    * ACE/tests/Reactor_Timer_Test.cpp:
    * ACE/tests/Refcounted_Auto_Ptr_Test.cpp:
    * ACE/tests/SString_Test.cpp:
    * ACE/tests/UUID_Test.cpp:
    * TAO/docs/events_tutorial.html:
    * TAO/docs/tutorials/Quoter/Simple/ImprovedServer/index.html:
    * TAO/examples/Borland/ChatClientWnd.cpp:
    * TAO/examples/Borland/ChatClientWnd.h:
    * TAO/examples/Load_Balancing/Load_Balancer_i.cpp:
    * TAO/orbsvcs/orbsvcs/AV/SCTP_SEQ.h:
    * TAO/orbsvcs/orbsvcs/Event/EC_ObserverStrategy.cpp:
    * TAO/orbsvcs/orbsvcs/HTIOP/HTIOP_Acceptor.cpp:
    * TAO/orbsvcs/orbsvcs/IFRService/AliasDef_i.cpp:
    * TAO/orbsvcs/orbsvcs/IFRService/ArrayDef_i.cpp:
    * TAO/orbsvcs/orbsvcs/IFRService/AttributeDef_i.cpp:
    * TAO/orbsvcs/orbsvcs/IFRService/ConstantDef_i.cpp:
    * TAO/orbsvcs/orbsvcs/IFRService/Contained_i.cpp:
    * TAO/orbsvcs/orbsvcs/IFRService/Container_i.cpp:
    * TAO/orbsvcs/orbsvcs/Log/RTEventLogFactory_i.cpp:
    * TAO/orbsvcs/orbsvcs/Naming/Persistent_Context_Index.cpp:
    * TAO/orbsvcs/orbsvcs/Naming/Persistent_Naming_Context.cpp:
    * TAO/orbsvcs/orbsvcs/Naming/Storable_Naming_Context.cpp:
    * TAO/orbsvcs/orbsvcs/Naming/Storable_Naming_Context_Activator.cpp:
    * TAO/orbsvcs/orbsvcs/Naming/Transient_Naming_Context.cpp:
    * TAO/orbsvcs/orbsvcs/Notify/ETCL_Filter.cpp:
    * TAO/orbsvcs/orbsvcs/Notify/EventChannel.h:
    * TAO/orbsvcs/orbsvcs/Notify/EventChannelFactory.cpp:
    * TAO/orbsvcs/orbsvcs/Notify/EventChannelFactory.h:
    * TAO/orbsvcs/orbsvcs/Notify/Event_Manager.h:
    * TAO/orbsvcs/orbsvcs/Notify/MonitorControl/NotificationServiceMonitor_i.cpp:
    * TAO/orbsvcs/orbsvcs/Notify/Object.cpp:
    * TAO/orbsvcs/orbsvcs/Notify/ProxyConsumer.cpp:
    * TAO/orbsvcs/orbsvcs/Notify/ProxyConsumer.h:
    * TAO/orbsvcs/orbsvcs/Notify/RT_Builder.cpp:
    * TAO/orbsvcs/orbsvcs/Notify/Structured/StructuredProxyPushConsumer.cpp:
    * TAO/orbsvcs/orbsvcs/Notify/ThreadPool_Task.h:
    * TAO/orbsvcs/orbsvcs/PortableGroup/Fragments_Cleanup_Strategy.cpp:
    * TAO/orbsvcs/orbsvcs/PortableGroup/GOA.cpp:
    * TAO/orbsvcs/orbsvcs/PortableGroup/PG_FactoryRegistry.cpp:
    * TAO/orbsvcs/orbsvcs/PortableGroup/PG_Group_List_Store.cpp:
    * TAO/orbsvcs/orbsvcs/PortableGroup/PG_Object_Group_Storable.cpp:
    * TAO/orbsvcs/orbsvcs/Sched/Reconfig_Scheduler_T.cpp:
    * TAO/orbsvcs/performance-tests/RTEvent/Colocated_Roundtrip/driver.cpp:
    * TAO/orbsvcs/performance-tests/RTEvent/Federated_Roundtrip/client.cpp:
    * TAO/orbsvcs/performance-tests/RTEvent/Federated_Roundtrip/server.cpp:
    * TAO/orbsvcs/performance-tests/RTEvent/RTCORBA_Baseline/client.cpp:
    * TAO/orbsvcs/performance-tests/RTEvent/RTCORBA_Baseline/server.cpp:
    * TAO/orbsvcs/performance-tests/RTEvent/RTCORBA_Callback/client.cpp:
    * TAO/orbsvcs/performance-tests/RTEvent/RTCORBA_Callback/server.cpp:
    * TAO/orbsvcs/performance-tests/RTEvent/Roundtrip/server.cpp:
    * TAO/orbsvcs/performance-tests/RTEvent/lib/Control.cpp:
    * TAO/orbsvcs/performance-tests/RTEvent/lib/Low_Priority_Setup.cpp:
    * TAO/orbsvcs/performance-tests/RTEvent/lib/Low_Priority_Setup.h:
    * TAO/orbsvcs/performance-tests/RTEvent/lib/RTEC_Initializer.cpp:
    * TAO/tao/Acceptor_Registry.cpp:
    * TAO/tao/CSD_ThreadPool/CSD_TP_Collocated_Synch_Request.inl:
    * TAO/tao/DynamicAny/DynAnyUtils_T.cpp:
    * TAO/tao/Dynamic_TP/DTP_Thread_Pool.cpp:
    * TAO/tao/IIOP_Acceptor.cpp:
    * TAO/tao/IIOP_Connector.cpp:
    * TAO/tao/LocateRequest_Invocation.cpp:
    * TAO/tao/Messaging/ExceptionHolder_i.cpp:
    * TAO/tao/ORB_Core.cpp:
    * TAO/tao/PortableServer/Active_Object_Map.cpp:
    * TAO/tao/PortableServer/Object_Adapter.cpp:
    * TAO/tao/PortableServer/Root_POA.cpp:
    * TAO/tao/RTCORBA/Thread_Pool.cpp:
    * TAO/tao/Strategies/SCIOP_Acceptor.cpp:
    * TAO/tao/ZIOP/ZIOP_Service_Context_Handler.cpp:
    * TAO/tests/IOR_Endpoint_Hostnames/list_interfaces.cpp:
  • Loading branch information
jwillemsen committed Sep 2, 2023
1 parent 806844f commit ed54a76
Show file tree
Hide file tree
Showing 126 changed files with 227 additions and 283 deletions.
5 changes: 2 additions & 3 deletions ACE/ACEXML/common/HttpCharStream.cpp
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
#include "ace/ACE.h"
#include "ace/ace_wchar.h"
#include "ace/Auto_Ptr.h"
#include "ace/OS_NS_stdio.h"
#include "ace/OS_NS_string.h"
#include "ace/Truncate.h"
Expand Down Expand Up @@ -272,7 +271,7 @@ int
ACEXML_HttpCharStream::send_request ()
{
char* path = ACE::strnew (ACE_TEXT_ALWAYS_CHAR (this->url_addr_->get_path_name()));
ACE_Auto_Basic_Array_Ptr<char> path_ptr (path);
std::unique_ptr<char[]> path_ptr (path);
size_t commandsize = ACE_OS::strlen (path)
+ ACE_OS::strlen (this->url_addr_->get_host_name ())
+ 20 // Extra
Expand All @@ -283,7 +282,7 @@ ACEXML_HttpCharStream::send_request ()
ACE_NEW_RETURN (command, char[commandsize], -1);

// Ensure that the <command> memory is deallocated.
ACE_Auto_Basic_Array_Ptr<char> cmd_ptr (command);
std::unique_ptr<char[]> cmd_ptr (command);

int bytes = ACE_OS::sprintf (command, "GET %s HTTP/1.0\r\n", path);
bytes += ACE_OS::sprintf (&command[bytes], "Host: %s\r\n",
Expand Down
4 changes: 2 additions & 2 deletions ACE/ACEXML/common/URL_Addr.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -5,11 +5,11 @@
#endif /* __ACEXML_INLINE__ */

#include "ace/Log_Msg.h"
#include "ace/Auto_Ptr.h"
#include "ace/OS_Memory.h"
#include "ace/OS_NS_stdio.h"
#include "ace/OS_NS_stdlib.h"
#include "ace/OS_NS_string.h"
#include <memory>

ACEXML_URL_Addr::ACEXML_URL_Addr ()
: path_name_ (0),
Expand Down Expand Up @@ -94,7 +94,7 @@ ACEXML_URL_Addr::string_to_addr (const ACEXML_Char* s,
ACE_NEW_RETURN (host_name, ACEXML_Char[host_len + 1], -1);
ACE_OS::strncpy (host_name, s + http_len, host_len);
host_name[host_len] = '\0';
ACE_Auto_Basic_Array_Ptr<ACEXML_Char> cleanup_host_name (host_name);
std::unique_ptr<ACEXML_Char[]> cleanup_host_name (host_name);

// Get the port number (if any)
unsigned short port = ACE_DEFAULT_HTTP_PORT;
Expand Down
6 changes: 3 additions & 3 deletions ACE/ACEXML/common/XML_Codecs.cpp
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
// -*- C++ -*-

#include "ace/Auto_Ptr.h"
#include "ace/OS_Memory.h"
#include "ace/OS_NS_string.h"
#include "ACEXML/common/XML_Codecs.h"
#include <memory>

ACEXML_Char*
ACEXML_Base64::encode (const ACEXML_Char* input,
Expand All @@ -17,7 +17,7 @@ ACEXML_Base64::encode (const ACEXML_Char* input,
ACE_NEW_RETURN (buf,
ACE_Byte[len],
0);
ACE_Auto_Basic_Array_Ptr<ACE_Byte> cleanup_buf (buf);
std::unique_ptr<ACE_Byte[]> cleanup_buf (buf);

for (size_t i = 0; i < len; ++i)
buf[i] = (ACE_Byte)input[i];
Expand Down Expand Up @@ -59,7 +59,7 @@ ACEXML_Base64::decode (const ACEXML_Char* input,
ACE_Byte[len],
0);

ACE_Auto_Basic_Array_Ptr<ACE_Byte> cleanup (buf);
std::unique_ptr<ACE_Byte[]> cleanup (buf);

for (size_t i = 0; i < len; ++i)
buf[i] = (ACE_Byte)input[i];
Expand Down
1 change: 0 additions & 1 deletion ACE/ACEXML/examples/SAXPrint/main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@
#include "Print_Handler.h"
#include "SAXPrint_Handler.h"
#include "ace/Get_Opt.h"
#include "ace/Auto_Ptr.h"
#include "ace/Log_Msg.h"
#include "ace/OS_main.h"

Expand Down
6 changes: 3 additions & 3 deletions ACE/ACEXML/parser/parser/Parser.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -318,7 +318,7 @@ ACEXML_Parser::parse_external_dtd ()
if (this->validate_)
{
ACEXML_Char* uri = this->normalize_systemid (systemId);
ACE_Auto_Basic_Array_Ptr<ACEXML_Char> cleanup_uri (uri);
std::unique_ptr<ACEXML_Char[]> cleanup_uri (uri);
ACEXML_InputSource* ip = 0;
if (this->entity_resolver_)
{
Expand Down Expand Up @@ -2091,7 +2091,7 @@ ACEXML_Parser::parse_entity_reference ()
else
{
ACEXML_Char* uri = this->normalize_systemid (systemId);
ACE_Auto_Basic_Array_Ptr<ACEXML_Char> cleanup_uri (uri);
std::unique_ptr<ACEXML_Char[]> cleanup_uri (uri);
ACEXML_InputSource* ip = 0;
if (this->entity_resolver_)
{
Expand Down Expand Up @@ -2184,7 +2184,7 @@ ACEXML_Parser::parse_PE_reference ()
else if (this->external_entity_ && this->validate_)
{
ACEXML_Char* uri = this->normalize_systemid (systemId);
ACE_Auto_Basic_Array_Ptr<ACEXML_Char> cleanup_uri (uri);
std::unique_ptr<ACEXML_Char[]> cleanup_uri (uri);
ACEXML_InputSource* ip = 0;
if (this->entity_resolver_)
{
Expand Down
1 change: 0 additions & 1 deletion ACE/ACEXML/parser/parser/Parser.h
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,6 @@
#include "ace/Hash_Map_Manager.h"
#include "ace/Unbounded_Set.h"
#include "ace/Containers_T.h"
#include "ace/Auto_Ptr.h"
#include "ACEXML/parser/parser/Entity_Manager.h"
#include "ACEXML/parser/parser/ParserInternals.h"
#include "ACEXML/parser/parser/ParserContext.h"
Expand Down
6 changes: 3 additions & 3 deletions ACE/Kokyu/Default_Dispatcher_Impl.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ Default_Dispatcher_Impl::init_i (const Dispatcher_Attributes& attrs)
//ACE_DEBUG ((LM_DEBUG, "after new on task array\n" ));
tasks_.reset(tasks_array);

//ACE_DEBUG ((LM_DEBUG, "task array auto_ptr set\n" ));
//ACE_DEBUG ((LM_DEBUG, "task array unique_ptr set\n" ));

ConfigInfoSet& config_set =
const_cast<ConfigInfoSet&> (attrs.config_info_set_);
Expand All @@ -52,8 +52,8 @@ Default_Dispatcher_Impl::init_i (const Dispatcher_Attributes& attrs)
Dispatcher_Task (*config,
ACE_Thread_Manager::instance()),
-1);
std::unique_ptr<Dispatcher_Task> tmp_task_auto_ptr (task);
tasks_[i++] = std::move(tmp_task_auto_ptr);
std::unique_ptr<Dispatcher_Task> tmp_task_unique_ptr (task);
tasks_[i++] = std::move(tmp_task_unique_ptr);
}

this->thr_creation_flags_ = attrs.thread_creation_flags ();
Expand Down
1 change: 0 additions & 1 deletion ACE/Kokyu/Kokyu_defs.h
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@
#include /**/ "ace/pre.h"
#include "ace/Containers_T.h"
#include "ace/Time_Value.h"
#include "ace/Auto_Ptr.h"
#include "ace/Message_Block.h"
#include "ace/Sched_Params.h"
#include "ace/Malloc_Allocator.h"
Expand Down
1 change: 0 additions & 1 deletion ACE/Kokyu/tests/DSRT_MIF/MIF.cpp
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
#include "ace/ACE.h"
#include "ace/Auto_Ptr.h"
#include "ace/Task.h"
#include "ace/Sched_Params.h"
#include "ace/Atomic_Op.h"
Expand Down
1 change: 0 additions & 1 deletion ACE/ace/ACE.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@

#include "ace/Basic_Types.h"
#include "ace/Handle_Set.h"
#include "ace/Auto_Ptr.h"
#include "ace/SString.h"
#include "ace/Version.h"
#include "ace/Message_Block.h"
Expand Down
5 changes: 2 additions & 3 deletions ACE/ace/Auto_Functor.h
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ class Auto_Functor
typedef Functor functor_type;

/// Constructor
explicit Auto_Functor (X * p = 0,
explicit Auto_Functor (X * p = nullptr,
Functor functor = Functor()); // noexcept

Auto_Functor (Auto_Functor & rhs); // noexcept
Expand All @@ -82,7 +82,7 @@ class Auto_Functor

X * release(); // noexcept

void reset (X * p = 0); // noexcept
void reset (X * p = nullptr); // noexcept

void reset (X * p, Functor f); // noexcept

Expand All @@ -98,7 +98,6 @@ class Auto_Functor

private:
X * p_;

Functor f_;
};
} // namespace ACE_Utils
Expand Down
4 changes: 4 additions & 0 deletions ACE/ace/Auto_Ptr.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,8 @@

#include "ace/Auto_Ptr.h"

#if !defined (ACE_HAS_CPP17)

#if defined (ACE_HAS_ALLOC_HOOKS)
# include "ace/Malloc_Base.h"
#endif /* ACE_HAS_ALLOC_HOOKS */
Expand All @@ -18,4 +20,6 @@ ACE_ALLOC_HOOK_DEFINE_Tt(ACE_Auto_Basic_Array_Ptr)

ACE_END_VERSIONED_NAMESPACE_DECL

#endif /* ACE_HAS_CPP17 */

#endif /* ACE_AUTO_PTR_CPP */
10 changes: 8 additions & 2 deletions ACE/ace/Auto_Ptr.h
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,10 @@
# pragma once
#endif /* ACE_LACKS_PRAGMA_ONCE */

// C++17 removed std::auto_ptr<>, so also disable the ACE versions when
// using C++17.
#if !defined (ACE_HAS_CPP17)

#if defined (_MSC_VER)
// Suppress warning e.g. "return type for
// 'ACE_Auto_Array_Pointer<type>::operator ->' is 'type *' (i.e., not a UDT
Expand All @@ -44,7 +48,7 @@ class ACE_Auto_Basic_Ptr
public:
typedef X element_type;

explicit ACE_Auto_Basic_Ptr (X * p = 0) : p_ (p) {}
explicit ACE_Auto_Basic_Ptr (X * p = nullptr) : p_ (p) {}

ACE_Auto_Basic_Ptr (ACE_Auto_Basic_Ptr<X> & ap);
ACE_Auto_Basic_Ptr<X> &operator= (ACE_Auto_Basic_Ptr<X> & rhs);
Expand All @@ -54,7 +58,7 @@ class ACE_Auto_Basic_Ptr
X &operator *() const;
X *get () const;
X *release ();
void reset (X * p = 0);
void reset (X * p = nullptr);

/// Dump the state of an object.
void dump () const;
Expand Down Expand Up @@ -198,5 +202,7 @@ ACE_END_VERSIONED_NAMESPACE_DECL
# pragma warning(pop)
#endif /* _MSC_VER */

#endif /* ACE_HAS_CPP17 */

#include /**/ "ace/post.h"
#endif /* ACE_AUTO_PTR_H */
6 changes: 5 additions & 1 deletion ACE/ace/Auto_Ptr.inl
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
// -*- C++ -*-
#include "ace/Global_Macros.h"

#if !defined (ACE_HAS_CPP17)

#if defined (ACE_HAS_ALLOC_HOOKS)
# include "ace/Malloc_Base.h"
#endif /* ACE_HAS_ALLOC_HOOKS */
Expand Down Expand Up @@ -42,7 +44,7 @@ ACE_Auto_Basic_Ptr<X>::release ()
{
ACE_TRACE ("ACE_Auto_Basic_Ptr<X>::release");
X *old = this->p_;
this->p_ = 0;
this->p_ = nullptr;
return old;
}

Expand Down Expand Up @@ -175,3 +177,5 @@ ACE_Auto_Array_Ptr<X>::operator->() const
}

ACE_END_VERSIONED_NAMESPACE_DECL

#endif /* ACE_HAS_CPP17 */
10 changes: 5 additions & 5 deletions ACE/ace/CDR_Stream.cpp
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
#include "ace/CDR_Stream.h"
#include "ace/SString.h"
#include "ace/Auto_Ptr.h"
#include "ace/Truncate.h"
#include <memory>

#if !defined (__ACE_INLINE__)
# include "ace/CDR_Stream.inl"
Expand Down Expand Up @@ -1530,7 +1530,7 @@ ACE_InputCDR::read_string (ACE_CDR::Char *&x)
0);
#endif /* ACE_HAS_ALLOC_HOOKS */

ACE_Auto_Basic_Array_Ptr<ACE_CDR::Char> safe_data (x);
std::unique_ptr<ACE_CDR::Char[]> safe_data (x);

if (this->read_char_array (x, len))
{
Expand Down Expand Up @@ -1563,10 +1563,10 @@ ACE_InputCDR::read_string (ACE_CDR::Char *&x)
ACE_CDR::Boolean
ACE_InputCDR::read_string (ACE_CString &x)
{
ACE_CDR::Char * data = 0;
ACE_CDR::Char * data = nullptr;
if (this->read_string (data))
{
ACE_Auto_Basic_Array_Ptr<ACE_CDR::Char> safe_data (data);
std::unique_ptr<ACE_CDR::Char[]> safe_data (data);
x = data;
return true;
}
Expand Down Expand Up @@ -1604,7 +1604,7 @@ ACE_InputCDR::read_wstring (ACE_CDR::WChar*& x)
// the memory is allocated.
if (len > 0 && len <= this->length ())
{
ACE_Auto_Basic_Array_Ptr<ACE_CDR::WChar> safe_data;
std::unique_ptr<ACE_CDR::WChar[]> safe_data;

if (static_cast<ACE_CDR::Short> (this->major_version_) == 1
&& static_cast<ACE_CDR::Short> (this->minor_version_) == 2)
Expand Down
4 changes: 2 additions & 2 deletions ACE/ace/DLL_Manager.cpp
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
#include "ace/DLL_Manager.h"

#include "ace/Auto_Ptr.h"
#include "ace/Log_Category.h"
#include "ace/ACE.h"
#include "ace/Framework_Component.h"
Expand All @@ -12,6 +11,7 @@
#include "ace/Guard_T.h"
#include "ace/OS_NS_dlfcn.h"
#include "ace/OS_NS_string.h"
#include <memory>

ACE_BEGIN_VERSIONED_NAMESPACE_DECL

Expand Down Expand Up @@ -243,7 +243,7 @@ ACE_DLL_Handle::symbol (const ACE_TCHAR *sym_name, bool ignore_errors, ACE_TStri
ACE_TRACE ("ACE_DLL_Handle::symbol");
ACE_MT (ACE_GUARD_RETURN (ACE_Thread_Mutex, ace_mon, this->lock_, 0));

ACE_Auto_Array_Ptr <ACE_TCHAR> auto_name (ACE::ldname (sym_name));
std::unique_ptr <ACE_TCHAR[]> auto_name (ACE::ldname (sym_name));
// handle_ can be invalid especially when ACE_DLL_Handle resigned ownership
// BTW. Handle lifecycle management is a little crazy in ACE
if (this->handle_ != ACE_SHLIB_INVALID_HANDLE)
Expand Down
2 changes: 1 addition & 1 deletion ACE/ace/Log_Msg.h
Original file line number Diff line number Diff line change
Expand Up @@ -657,7 +657,7 @@ class ACE_Export ACE_Log_Msg
/// passed "true" for the delete_ostream argument to msg_ostream).
/// If we are reference counting, this points to a shared count that will
/// be deleted when it reaches zero. Since we want optional but shared
/// ownership neither std::auto_ptr nor ACE_Strong_Bound_Ptr have the right
/// ownership neither std::unique_ptr nor ACE_Strong_Bound_Ptr have the right
/// semantics. *Bound_Ptr also doesn't take advantage of Atomic_Op.
typedef ACE_Atomic_Op<ACE_SYNCH_MUTEX, unsigned long> Atomic_ULong;
Atomic_ULong *ostream_refcount_;
Expand Down
1 change: 0 additions & 1 deletion ACE/ace/Pagefile_Memory_Pool.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@
#endif /* __ACE_INLINE__ */

#include "ace/Log_Category.h"
#include "ace/Auto_Ptr.h"
#include "ace/RW_Thread_Mutex.h"
#include "ace/OS_NS_sys_mman.h"
#include "ace/OS_NS_string.h"
Expand Down
1 change: 0 additions & 1 deletion ACE/ace/Proactor.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@

// This only works on Win32 platforms and on Unix platforms with aio
// calls.
#include "ace/Auto_Ptr.h"
#include "ace/Proactor_Impl.h"
#include "ace/Object_Manager.h"
#include "ace/Task_T.h"
Expand Down
Loading

0 comments on commit ed54a76

Please sign in to comment.