From bcb4be3a5d00b3407874d580c962a964f77cbe52 Mon Sep 17 00:00:00 2001 From: smf- Date: Sun, 24 Sep 2017 13:45:58 +0100 Subject: fix for clang 5 unused lambda capture errors (nw) --- src/lib/util/server_http_impl.hpp | 2 +- src/lib/util/server_ws_impl.hpp | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) (limited to 'src/lib') diff --git a/src/lib/util/server_http_impl.hpp b/src/lib/util/server_http_impl.hpp index e8b76ad2f74..4f909c023ef 100644 --- a/src/lib/util/server_http_impl.hpp +++ b/src/lib/util/server_http_impl.hpp @@ -220,7 +220,7 @@ namespace webpp { ///Use this function if you need to recursively send parts of a longer message void send(const std::shared_ptr &response, const std::function& callback=nullptr) const { - asio::async_write(*response->socket(), response->m_streambuf, [this, response, callback](const std::error_code& ec, size_t /*bytes_transferred*/) { + asio::async_write(*response->socket(), response->m_streambuf, [response, callback](const std::error_code& ec, size_t /*bytes_transferred*/) { if(callback) callback(ec); }); diff --git a/src/lib/util/server_ws_impl.hpp b/src/lib/util/server_ws_impl.hpp index 35f0043ed10..cbb6f9b4908 100644 --- a/src/lib/util/server_ws_impl.hpp +++ b/src/lib/util/server_ws_impl.hpp @@ -282,7 +282,7 @@ namespace webpp { else header_stream->put(static_cast(length)); - connection->strand.post([this, connection, header_stream, message_stream, callback]() { + connection->strand.post([connection, header_stream, message_stream, callback]() { connection->send_queue.emplace_back(header_stream, message_stream, callback); if(connection->send_queue.size()==1) connection->send_from_queue(connection); @@ -493,7 +493,7 @@ namespace webpp { //Close connection if unmasked message from client (protocol error) if(first_bytes[1]<128) { const std::string reason("message from client not masked"); - send_close(connection, 1002, reason, [this, connection](const std::error_code& /*ec*/) {}); + send_close(connection, 1002, reason, [connection](const std::error_code& /*ec*/) {}); connection_close(connection, endpoint, 1002, reason); return; } @@ -586,7 +586,7 @@ namespace webpp { } auto reason=message->string(); - send_close(connection, status, reason, [this, connection](const std::error_code& /*ec*/) {}); + send_close(connection, status, reason, [connection](const std::error_code& /*ec*/) {}); connection_close(connection, endpoint, status, reason); return; } -- cgit v1.2.3