Skip to content

Commit ae63e64

Browse files
committed
Removing usage of constructor chaining since not support on VS 2012.
1 parent d9e5331 commit ae63e64

File tree

3 files changed

+10
-2
lines changed

3 files changed

+10
-2
lines changed

Release/include/cpprest/ws_client.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -379,7 +379,7 @@ class websocket_client
379379
/// <summary>
380380
/// Creates a new websocket_client.
381381
/// </summary>
382-
websocket_client() : websocket_client(websocket_client_config()) {}
382+
_ASYNCRTIMP websocket_client();
383383

384384
/// <summary>
385385
/// Creates a new websocket_client.

Release/src/websockets/client/ws_client.cpp

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -688,6 +688,10 @@ class wspp_client : public _websocket_client_impl, public std::enable_shared_fro
688688

689689
}
690690

691+
websocket_client::websocket_client() :
692+
m_client(std::make_shared<details::wspp_client>(websocket_client_config()))
693+
{}
694+
691695
websocket_client::websocket_client(websocket_client_config config) :
692696
m_client(std::make_shared<details::wspp_client>(std::move(config)))
693697
{}

Release/src/websockets/client/ws_winrt.cpp

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -507,8 +507,12 @@ void ReceiveContext::OnClosed(IWebSocket^ sender, WebSocketClosedEventArgs^ args
507507
}
508508
}
509509

510+
websocket_client::websocket_client() :
511+
m_client(std::make_shared<details::winrt_client>(websocket_client_config()))
512+
{}
513+
510514
websocket_client::websocket_client(websocket_client_config config) :
511-
m_client(std::make_shared<details::ws_winrt_client>(std::move(config)))
515+
m_client(std::make_shared<details::winrt_client>(std::move(config)))
512516
{}
513517

514518
}}}}

0 commit comments

Comments
 (0)