summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJohnny Willemsen <jwillemsen@remedy.nl>2018-05-15 15:32:58 +0200
committerJohnny Willemsen <jwillemsen@remedy.nl>2018-05-15 15:32:58 +0200
commitc4a7434d85ec752a5939bfafc35384534fc4705d (patch)
treed5bbfb74e37ad3e51c93fc8a2f6b1f04f1fdf795
parent2201a11b5acbbe38c86f72e8e444b1932196d38e (diff)
downloadATCD-c4a7434d85ec752a5939bfafc35384534fc4705d.tar.gz
Make use of std::unique_ptr with C++11
* TAO/orbsvcs/orbsvcs/Naming/Naming_Server.cpp:
-rw-r--r--TAO/orbsvcs/orbsvcs/Naming/Naming_Server.cpp4
1 files changed, 4 insertions, 0 deletions
diff --git a/TAO/orbsvcs/orbsvcs/Naming/Naming_Server.cpp b/TAO/orbsvcs/orbsvcs/Naming/Naming_Server.cpp
index d35ba8282e2..777aaef1614 100644
--- a/TAO/orbsvcs/orbsvcs/Naming/Naming_Server.cpp
+++ b/TAO/orbsvcs/orbsvcs/Naming/Naming_Server.cpp
@@ -496,7 +496,11 @@ TAO_Naming_Server::init_new_naming (CORBA::ORB_ptr orb,
this->storable_naming_context_factory (context_size);
// Make sure we got a factory
if (cf == 0) return -1;
+#if defined (ACE_HAS_CPP11)
+ std::unique_ptr<TAO_Storable_Naming_Context_Factory> contextFactory (cf);
+#else
auto_ptr<TAO_Storable_Naming_Context_Factory> contextFactory (cf);
+#endif /* ACE_HAS_CPP11 */
// This instance will either get deleted after recreate all or,
// in the case of a servant activator's use, on destruction of the