diff options
author | Johnny Willemsen <jwillemsen@remedy.nl> | 2018-05-15 17:10:48 +0200 |
---|---|---|
committer | Johnny Willemsen <jwillemsen@remedy.nl> | 2018-05-15 17:10:48 +0200 |
commit | 0de4dc18e8809c9c0d47ae810ae6d5d087dab087 (patch) | |
tree | 6f7fac8fde702ce2623ecab4dc3d99edbe3cad13 | |
parent | 774e7f6ef1630fc42d3bf45d45e37fbaeb101659 (diff) | |
download | ATCD-0de4dc18e8809c9c0d47ae810ae6d5d087dab087.tar.gz |
Make use of std::unique_ptr when we have C++11
* ACE/ace/OS_NS_Thread.cpp:
-rw-r--r-- | ACE/ace/OS_NS_Thread.cpp | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/ACE/ace/OS_NS_Thread.cpp b/ACE/ace/OS_NS_Thread.cpp index 18ac132a7df..38f92de4943 100644 --- a/ACE/ace/OS_NS_Thread.cpp +++ b/ACE/ace/OS_NS_Thread.cpp @@ -13,7 +13,6 @@ #include "ace/OS_NS_errno.h" #include "ace/OS_NS_ctype.h" #include "ace/Log_Category.h" // for ACE_ASSERT -// This is necessary to work around nasty problems with MVS C++. #include "ace/Auto_Ptr.h" #include "ace/Thread_Mutex.h" #include "ace/Condition_Thread_Mutex.h" @@ -3557,7 +3556,11 @@ ACE_OS::thr_create (ACE_THR_FUNC func, else thread_args = thread_adapter; +#if defined (ACE_HAS_CPP11) + std::unique_ptr <ACE_Base_Thread_Adapter> auto_thread_args; +#else auto_ptr <ACE_Base_Thread_Adapter> auto_thread_args; +#endif /* ACE_HAS_CPP11 */ if (thread_adapter == 0) ACE_auto_ptr_reset (auto_thread_args, |