diff options
author | Johnny Willemsen <jwillemsen@remedy.nl> | 2020-12-17 13:23:27 +0100 |
---|---|---|
committer | Johnny Willemsen <jwillemsen@remedy.nl> | 2020-12-17 13:23:27 +0100 |
commit | 39d3174f11de3c59984043c45f9be30a7aa42dd9 (patch) | |
tree | 5af87d3a7308edfb5403459b607349dab80b7583 /ACE | |
parent | a466e4133b6de32437a27c2694edaeedf5a6d90c (diff) | |
download | ATCD-39d3174f11de3c59984043c45f9be30a7aa42dd9.tar.gz |
Use unique_ptr
* ACE/Kokyu/Default_Dispatcher_Impl.cpp:
* ACE/Kokyu/Default_Dispatcher_Impl.h:
* ACE/Kokyu/Kokyu.h:
* ACE/Kokyu/Kokyu_dsrt.h:
* ACE/Kokyu/tests/EDF/test.cpp:
* ACE/Kokyu/tests/FIFO/test.cpp:
* ACE/examples/C++NPv1/RT_Thread_Per_Connection_Logging_Server.cpp:
* ACE/examples/C++NPv1/Thread_Per_Connection_Logging_Server.cpp:
Diffstat (limited to 'ACE')
-rw-r--r-- | ACE/Kokyu/Default_Dispatcher_Impl.cpp | 1 | ||||
-rw-r--r-- | ACE/Kokyu/Default_Dispatcher_Impl.h | 2 | ||||
-rw-r--r-- | ACE/Kokyu/Kokyu.h | 1 | ||||
-rw-r--r-- | ACE/Kokyu/Kokyu_dsrt.h | 1 | ||||
-rw-r--r-- | ACE/Kokyu/tests/EDF/test.cpp | 2 | ||||
-rw-r--r-- | ACE/Kokyu/tests/FIFO/test.cpp | 2 | ||||
-rw-r--r-- | ACE/examples/C++NPv1/RT_Thread_Per_Connection_Logging_Server.cpp | 6 | ||||
-rw-r--r-- | ACE/examples/C++NPv1/Thread_Per_Connection_Logging_Server.cpp | 6 |
8 files changed, 12 insertions, 9 deletions
diff --git a/ACE/Kokyu/Default_Dispatcher_Impl.cpp b/ACE/Kokyu/Default_Dispatcher_Impl.cpp index 30709efe3f0..c5f067fb878 100644 --- a/ACE/Kokyu/Default_Dispatcher_Impl.cpp +++ b/ACE/Kokyu/Default_Dispatcher_Impl.cpp @@ -2,6 +2,7 @@ #include "ace/Sched_Params.h" #include <utility> +#include <memory> #if ! defined (__ACE_INLINE__) #include "Default_Dispatcher_Impl.inl" diff --git a/ACE/Kokyu/Default_Dispatcher_Impl.h b/ACE/Kokyu/Default_Dispatcher_Impl.h index 32a790e0d65..350c88d179d 100644 --- a/ACE/Kokyu/Default_Dispatcher_Impl.h +++ b/ACE/Kokyu/Default_Dispatcher_Impl.h @@ -19,11 +19,11 @@ # pragma once #endif /* ACE_LACKS_PRAGMA_ONCE */ -#include "ace/Auto_Ptr.h" #include "kokyu_export.h" #include "Kokyu_defs.h" #include "Dispatcher_Impl.h" #include "Dispatcher_Task.h" +#include <memory> namespace Kokyu { diff --git a/ACE/Kokyu/Kokyu.h b/ACE/Kokyu/Kokyu.h index 119d9827195..bbf444a4a7d 100644 --- a/ACE/Kokyu/Kokyu.h +++ b/ACE/Kokyu/Kokyu.h @@ -18,6 +18,7 @@ #endif /* ACE_LACKS_PRAGMA_ONCE */ #include <utility> +#include <memory> #include "kokyu_export.h" #include "Kokyu_defs.h" diff --git a/ACE/Kokyu/Kokyu_dsrt.h b/ACE/Kokyu/Kokyu_dsrt.h index 6cba50c3d68..11f24ec1eac 100644 --- a/ACE/Kokyu/Kokyu_dsrt.h +++ b/ACE/Kokyu/Kokyu_dsrt.h @@ -12,6 +12,7 @@ #include "kokyu_export.h" #include "Kokyu_defs.h" +#include <memory> namespace Kokyu { diff --git a/ACE/Kokyu/tests/EDF/test.cpp b/ACE/Kokyu/tests/EDF/test.cpp index ed90eafaf87..46fa980f0fd 100644 --- a/ACE/Kokyu/tests/EDF/test.cpp +++ b/ACE/Kokyu/tests/EDF/test.cpp @@ -5,7 +5,7 @@ #include "ace/Get_Opt.h" #include "ace/OS_NS_strings.h" #include "ace/OS_NS_sys_time.h" -#include <utility> +#include <memory> ACE_CString sched_policy_str = "fifo"; diff --git a/ACE/Kokyu/tests/FIFO/test.cpp b/ACE/Kokyu/tests/FIFO/test.cpp index e7cd1071cb9..b0e5dd5f7a2 100644 --- a/ACE/Kokyu/tests/FIFO/test.cpp +++ b/ACE/Kokyu/tests/FIFO/test.cpp @@ -3,7 +3,7 @@ #include "ace/SString.h" #include "ace/Get_Opt.h" #include "ace/OS_NS_strings.h" -#include <utility> +#include <memory> ACE_CString sched_policy_str = "fifo"; diff --git a/ACE/examples/C++NPv1/RT_Thread_Per_Connection_Logging_Server.cpp b/ACE/examples/C++NPv1/RT_Thread_Per_Connection_Logging_Server.cpp index 8b2ac983310..1438c5e7148 100644 --- a/ACE/examples/C++NPv1/RT_Thread_Per_Connection_Logging_Server.cpp +++ b/ACE/examples/C++NPv1/RT_Thread_Per_Connection_Logging_Server.cpp @@ -2,7 +2,6 @@ ** Copyright 2001 Addison Wesley. All Rights Reserved. */ -#include "ace/Auto_Ptr.h" #include "ace/FILE_IO.h" #include "ace/Log_Msg.h" #include "ace/Sched_Params.h" @@ -13,6 +12,7 @@ #include "Logging_Handler.h" #include <errno.h> +#include <memory> namespace { extern "C" void sigterm_handler (int /* signum */) { /* No-op. */ } @@ -59,7 +59,7 @@ RT_Thread_Per_Connection_Logging_Server::handle_data (ACE_SOCK_Stream *client) ACE_THR_FUNC_RETURN Thread_Per_Connection_Logging_Server::run_svc (void *arg) { - auto_ptr<Thread_Args> thread_args (static_cast<Thread_Args *> (arg)); + std::unique_ptr<Thread_Args> thread_args (static_cast<Thread_Args *> (arg)); thread_args->this_->handle_data (&thread_args->logging_peer_); thread_args->logging_peer_.close (); @@ -70,7 +70,7 @@ ACE_THR_FUNC_RETURN Thread_Per_Connection_Logging_Server::run_svc (void *arg) int Thread_Per_Connection_Logging_Server::handle_connections () { - auto_ptr<Thread_Args> thread_args (new Thread_Args (this)); + std::unique_ptr<Thread_Args> thread_args (new Thread_Args (this)); if (acceptor ().accept (thread_args->logging_peer_) == -1) return -1; diff --git a/ACE/examples/C++NPv1/Thread_Per_Connection_Logging_Server.cpp b/ACE/examples/C++NPv1/Thread_Per_Connection_Logging_Server.cpp index d5d9196400c..6fc5d395049 100644 --- a/ACE/examples/C++NPv1/Thread_Per_Connection_Logging_Server.cpp +++ b/ACE/examples/C++NPv1/Thread_Per_Connection_Logging_Server.cpp @@ -2,7 +2,6 @@ ** Copyright 2001 Addison Wesley. All Rights Reserved. */ -#include "ace/Auto_Ptr.h" #include "ace/FILE_IO.h" #include "ace/Log_Msg.h" #include "ace/Signal.h" @@ -12,6 +11,7 @@ #include "Logging_Handler.h" #include <errno.h> +#include <memory> namespace { extern "C" void sigterm_handler (int /* signum */) { /* No-op. */ } @@ -20,7 +20,7 @@ namespace { ACE_THR_FUNC_RETURN Thread_Per_Connection_Logging_Server::run_svc (void *arg) { - auto_ptr<Thread_Args> thread_args (static_cast<Thread_Args *> (arg)); + std::unique_ptr<Thread_Args> thread_args (static_cast<Thread_Args *> (arg)); thread_args->this_->handle_data (&thread_args->logging_peer_); thread_args->logging_peer_.close (); @@ -31,7 +31,7 @@ ACE_THR_FUNC_RETURN Thread_Per_Connection_Logging_Server::run_svc (void *arg) int Thread_Per_Connection_Logging_Server::handle_connections () { - auto_ptr<Thread_Args> thread_args (new Thread_Args (this)); + std::unique_ptr<Thread_Args> thread_args (new Thread_Args (this)); if (acceptor ().accept (thread_args->logging_peer_) == -1) return -1; |