diff options
author | 2017-09-24 13:45:58 +0100 | |
---|---|---|
committer | 2017-09-24 17:49:35 +0100 | |
commit | bcb4be3a5d00b3407874d580c962a964f77cbe52 (patch) | |
tree | 4165c178e9bdf33ef85f7cb23dc0d9757df8ef1b /src/lib | |
parent | ba580ae3bf4c0d668ece4b0c4a6e0c501ea043ea (diff) |
fix for clang 5 unused lambda capture errors (nw)
Diffstat (limited to 'src/lib')
-rw-r--r-- | src/lib/util/server_http_impl.hpp | 2 | ||||
-rw-r--r-- | src/lib/util/server_ws_impl.hpp | 6 |
2 files changed, 4 insertions, 4 deletions
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> &response, const std::function<void(const std::error_code&)>& 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<unsigned char>(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; } |