Skip to content

Commit

Permalink
stop using C++14 lambda capture init, code should be C++11 compatible
Browse files Browse the repository at this point in the history
  • Loading branch information
bsergean committed Jan 3, 2021
1 parent d0359a1 commit f6e34e4
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions ixwebsocket/IXWebSocketServer.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -97,9 +97,10 @@ namespace ix
}
else if (_onClientMessageCallback)
{
WebSocket* webSocketRawPtr = webSocket.get();
webSocket->setOnMessageCallback(
[this, &ws = *webSocket.get(), connectionState](const WebSocketMessagePtr& msg) {
_onClientMessageCallback(connectionState, ws, msg);
[this, webSocketRawPtr, connectionState](const WebSocketMessagePtr& msg) {
_onClientMessageCallback(connectionState, *webSocketRawPtr, msg);
});
}
else
Expand Down

0 comments on commit f6e34e4

Please sign in to comment.