Skip to content

Commit 032c993

Browse files
committed
websocketserver: Replace implicit lamda captures for C++20
1 parent 8c6e908 commit 032c993

2 files changed

Lines changed: 2 additions & 2 deletions

File tree

src/websocketserver/WebSocketServer.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -349,7 +349,7 @@ void WebSocketServer::onMessage(websocketpp::connection_hdl hdl,
349349
{
350350
auto opCode = message->get_opcode();
351351
std::string payload = message->get_payload();
352-
_threadPool.start(Utils::Compat::CreateFunctionRunnable([=]() {
352+
_threadPool.start(Utils::Compat::CreateFunctionRunnable([hdl, payload, opCode, this]() {
353353
std::unique_lock<std::mutex> lock(_sessionMutex);
354354
SessionPtr session;
355355
try {

src/websocketserver/WebSocketServer_Protocol.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -359,7 +359,7 @@ void WebSocketServer::BroadcastEvent(uint64_t requiredIntent, const std::string
359359
if (!_server.is_listening() || !_obsReady)
360360
return;
361361

362-
_threadPool.start(Utils::Compat::CreateFunctionRunnable([=]() {
362+
_threadPool.start(Utils::Compat::CreateFunctionRunnable([eventType, requiredIntent, eventData, rpcVersion, this]() {
363363
// Populate message object
364364
json eventMessage;
365365
eventMessage["op"] = 5;

0 commit comments

Comments
 (0)