summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJohnny Willemsen <jwillemsen@remedy.nl>2018-05-15 13:43:53 +0200
committerJohnny Willemsen <jwillemsen@remedy.nl>2018-05-15 13:43:53 +0200
commit80f2464b6e7f72016db991dbd12e87ba1fd83271 (patch)
treeccd1894a3cc81c076bb43599987efbad2a9e1c0e
parentb361514d8bea5de5bd984bb10205ecf0843c04c6 (diff)
downloadATCD-80f2464b6e7f72016db991dbd12e87ba1fd83271.tar.gz
Make use of std::unique_ptr when we have C++11
* TAO/tao/AnyTypeCode/Any_Dual_Impl_T.cpp: * TAO/tao/AnyTypeCode/Any_Special_Impl_T.cpp:
-rw-r--r--TAO/tao/AnyTypeCode/Any_Dual_Impl_T.cpp4
-rw-r--r--TAO/tao/AnyTypeCode/Any_Special_Impl_T.cpp7
2 files changed, 9 insertions, 2 deletions
diff --git a/TAO/tao/AnyTypeCode/Any_Dual_Impl_T.cpp b/TAO/tao/AnyTypeCode/Any_Dual_Impl_T.cpp
index db82084f814..42cc10a0066 100644
--- a/TAO/tao/AnyTypeCode/Any_Dual_Impl_T.cpp
+++ b/TAO/tao/AnyTypeCode/Any_Dual_Impl_T.cpp
@@ -170,7 +170,11 @@ TAO::Any_Dual_Impl_T<T>::replace (TAO_InputCDR &cdr,
empty_value),
false);
+#if defined (ACE_HAS_CPP11)
+ std::unique_ptr<TAO::Any_Dual_Impl_T<T> > replacement_safety (replacement);
+#else
auto_ptr<TAO::Any_Dual_Impl_T<T> > replacement_safety (replacement);
+#endif /* ACE_HAS_CPP11 */
CORBA::Boolean const good_decode = replacement->demarshal_value (cdr);
diff --git a/TAO/tao/AnyTypeCode/Any_Special_Impl_T.cpp b/TAO/tao/AnyTypeCode/Any_Special_Impl_T.cpp
index e0055e0cb2f..a5cdeb3239d 100644
--- a/TAO/tao/AnyTypeCode/Any_Special_Impl_T.cpp
+++ b/TAO/tao/AnyTypeCode/Any_Special_Impl_T.cpp
@@ -129,8 +129,11 @@ TAO::Any_Special_Impl_T<T, from_T, to_T>::extract (const CORBA::Any & any,
bound),
false);
- auto_ptr<TAO::Any_Special_Impl_T<T, from_T, to_T> > replacement_safety (
- replacement);
+#if defined (ACE_HAS_CPP11)
+ std::unique_ptr<TAO::Any_Special_Impl_T<T, from_T, to_T> > replacement_safety (replacement);
+#else
+ auto_ptr<TAO::Any_Special_Impl_T<T, from_T, to_T> > replacement_safety (replacement);
+#endif /* ACE_HAS_CPP11 */
// We know this will work since the unencoded case is covered above.
TAO::Unknown_IDL_Type * const unk =