diff options
author | Johnny Willemsen <jwillemsen@remedy.nl> | 2018-05-15 13:43:53 +0200 |
---|---|---|
committer | Johnny Willemsen <jwillemsen@remedy.nl> | 2018-05-15 13:43:53 +0200 |
commit | 80f2464b6e7f72016db991dbd12e87ba1fd83271 (patch) | |
tree | ccd1894a3cc81c076bb43599987efbad2a9e1c0e | |
parent | b361514d8bea5de5bd984bb10205ecf0843c04c6 (diff) | |
download | ATCD-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.cpp | 4 | ||||
-rw-r--r-- | TAO/tao/AnyTypeCode/Any_Special_Impl_T.cpp | 7 |
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 = |