summaryrefslogtreecommitdiff
path: root/cpp/test/Ice/adapterDeactivation/ServantLocatorI.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'cpp/test/Ice/adapterDeactivation/ServantLocatorI.cpp')
-rw-r--r--cpp/test/Ice/adapterDeactivation/ServantLocatorI.cpp18
1 files changed, 15 insertions, 3 deletions
diff --git a/cpp/test/Ice/adapterDeactivation/ServantLocatorI.cpp b/cpp/test/Ice/adapterDeactivation/ServantLocatorI.cpp
index 5ccb73e8802..02ae90f5771 100644
--- a/cpp/test/Ice/adapterDeactivation/ServantLocatorI.cpp
+++ b/cpp/test/Ice/adapterDeactivation/ServantLocatorI.cpp
@@ -26,25 +26,37 @@ ServantLocatorI::~ServantLocatorI()
}
Ice::ObjectPtr
+#ifdef ICE_CPP11_MAPPING
+ServantLocatorI::locate(const Ice::Current& current, std::shared_ptr<void>& cookie)
+#else
ServantLocatorI::locate(const Ice::Current& current, Ice::LocalObjectPtr& cookie)
+#endif
{
test(!_deactivated);
test(current.id.category == "");
test(current.id.name == "test");
- cookie = new CookieI;
+ cookie = ICE_MAKE_SHARED(CookieI);
- return new TestI;
+ return ICE_MAKE_SHARED(TestI);
}
void
+#ifdef ICE_CPP11_MAPPING
+ServantLocatorI::finished(const Ice::Current&, const Ice::ObjectPtr&,
+ const std::shared_ptr<void>& cookie)
+#else
ServantLocatorI::finished(const Ice::Current&, const Ice::ObjectPtr&,
const Ice::LocalObjectPtr& cookie)
+#endif
{
test(!_deactivated);
-
+#ifdef ICE_CPP11_MAPPING
+ shared_ptr<CookieI> co = static_pointer_cast<CookieI>(cookie);
+#else
CookiePtr co = CookiePtr::dynamicCast(cookie);
+#endif
test(co);
test(co->message() == "blahblah");
}