From 44c491889ddbcfca963aa54e175d81f0eade058d Mon Sep 17 00:00:00 2001 From: Gareth Sylvester-Bradley <31761158+garethsb-sony@users.noreply.github.com> Date: Fri, 2 Aug 2019 20:27:46 +0100 Subject: [PATCH] Workarounds for two GCC 4.7.2 bugs with lambda functions (#1209) * Workarounds for two GCC 4.7.2 bugs with lambda functions using implicit this, surfacing as incorrect const-qualification and an internal compiler error. Resolves immediate issues identified in #1200. * Restore compatibility with modern compilers --- Release/src/websockets/client/ws_client_wspp.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/Release/src/websockets/client/ws_client_wspp.cpp b/Release/src/websockets/client/ws_client_wspp.cpp index ef9c1d0bd3..d7c31c4095 100644 --- a/Release/src/websockets/client/ws_client_wspp.cpp +++ b/Release/src/websockets/client/ws_client_wspp.cpp @@ -292,7 +292,7 @@ class wspp_callback_client : public websocket_client_callback_impl, client.set_fail_handler([this](websocketpp::connection_hdl con_hdl) { _ASSERTE(m_state == CONNECTING); - shutdown_wspp_impl(con_hdl, true); + this->shutdown_wspp_impl(con_hdl, true); }); client.set_message_handler( @@ -354,7 +354,7 @@ class wspp_callback_client : public websocket_client_callback_impl, client.set_close_handler([this](websocketpp::connection_hdl con_hdl) { _ASSERTE(m_state != CLOSED); - shutdown_wspp_impl(con_hdl, false); + this->shutdown_wspp_impl(con_hdl, false); }); // Set User Agent specified by the user. This needs to happen before any connection is created @@ -679,7 +679,7 @@ class wspp_callback_client : public websocket_client_callback_impl, client.stop_perpetual(); // Can't join thread directly since it is the current thread. - pplx::create_task([this, connecting, ec, closeCode, reason] { + pplx::create_task([] {}).then([this, connecting, ec, closeCode, reason]() mutable { { std::lock_guard lock(m_wspp_client_lock); if (m_thread.joinable())