summaryrefslogtreecommitdiff
path: root/cpp
diff options
context:
space:
mode:
Diffstat (limited to 'cpp')
-rw-r--r--cpp/src/Glacier2Lib/SessionHelper.cpp3
-rw-r--r--cpp/test/Ice/acm/AllTests.cpp4
2 files changed, 3 insertions, 4 deletions
diff --git a/cpp/src/Glacier2Lib/SessionHelper.cpp b/cpp/src/Glacier2Lib/SessionHelper.cpp
index c6f50501a47..85c513a7081 100644
--- a/cpp/src/Glacier2Lib/SessionHelper.cpp
+++ b/cpp/src/Glacier2Lib/SessionHelper.cpp
@@ -790,8 +790,7 @@ SessionHelperI::connected(const Glacier2::RouterPrxPtr& router, const Glacier2::
assert(connection);
connection->setACM(acmTimeout, IceUtil::None, Ice::HeartbeatAlways);
#ifdef ICE_CPP11_MAPPING
- auto self(shared_from_this());
- connection->setCloseCallback([self](Ice::ConnectionPtr)
+ connection->setCloseCallback([self = shared_from_this()](Ice::ConnectionPtr)
{
self->destroy();
});
diff --git a/cpp/test/Ice/acm/AllTests.cpp b/cpp/test/Ice/acm/AllTests.cpp
index fbba4913d51..6223d4240ad 100644
--- a/cpp/test/Ice/acm/AllTests.cpp
+++ b/cpp/test/Ice/acm/AllTests.cpp
@@ -199,8 +199,8 @@ public:
try
{
#ifdef ICE_CPP11_MAPPING
- proxy->ice_getConnection()->setCloseCallback
- ([self = shared_from_this()](Ice::ConnectionPtr connection)
+ proxy->ice_getConnection()->setCloseCallback(
+ [self = shared_from_this()](Ice::ConnectionPtr connection)
{
self->closed(move(connection));
});