summaryrefslogtreecommitdiff
path: root/cpp/src/Ice/CollocatedRequestHandler.cpp
diff options
context:
space:
mode:
authorJose <jose@zeroc.com>2015-12-21 20:21:21 +0100
committerJose <jose@zeroc.com>2015-12-21 20:21:21 +0100
commit31607cd5a0db7bdc56a938e78155eaf076a5e06d (patch)
tree8676c30e797a7e3797de4aa43d158da42f927ad8 /cpp/src/Ice/CollocatedRequestHandler.cpp
parentAlso define stream creation methods for the C++11 mapping (diff)
downloadice-31607cd5a0db7bdc56a938e78155eaf076a5e06d.tar.bz2
ice-31607cd5a0db7bdc56a938e78155eaf076a5e06d.tar.xz
ice-31607cd5a0db7bdc56a938e78155eaf076a5e06d.zip
C++ shared_from_this simplifications
Diffstat (limited to 'cpp/src/Ice/CollocatedRequestHandler.cpp')
-rw-r--r--cpp/src/Ice/CollocatedRequestHandler.cpp12
1 files changed, 2 insertions, 10 deletions
diff --git a/cpp/src/Ice/CollocatedRequestHandler.cpp b/cpp/src/Ice/CollocatedRequestHandler.cpp
index 20349210b21..87a3d09c0f2 100644
--- a/cpp/src/Ice/CollocatedRequestHandler.cpp
+++ b/cpp/src/Ice/CollocatedRequestHandler.cpp
@@ -126,11 +126,7 @@ CollocatedRequestHandler::~CollocatedRequestHandler()
RequestHandlerPtr
CollocatedRequestHandler::update(const RequestHandlerPtr& previousHandler, const RequestHandlerPtr& newHandler)
{
-#ifdef ICE_CPP11_MAPPING
- return previousHandler.get() == this ? newHandler : dynamic_pointer_cast<RequestHandler>(shared_from_this());
-#else
- return previousHandler.get() == this ? newHandler : this;
-#endif
+ return previousHandler.get() == this ? newHandler : shared_from_this();
}
bool
@@ -277,11 +273,7 @@ CollocatedRequestHandler::invokeAsyncRequest(OutgoingAsyncBase* outAsync, int ba
//
// This will throw if the request is canceled
//
-#ifdef ICE_CPP11_MAPPING
- outAsync->cancelable(dynamic_pointer_cast<CollocatedRequestHandler>(shared_from_this()));
-#else
- outAsync->cancelable(this);
-#endif
+ outAsync->cancelable(shared_from_this());
if(_response)
{