Skip to content

Commit 38f4ee0

Browse files
committed
Use perfect forwarding, and conditional the includings
1 parent 0cbd37e commit 38f4ee0

File tree

2 files changed

+4
-2
lines changed

2 files changed

+4
-2
lines changed

Release/include/cpprest/http_listener.h

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,9 @@
2929
#include <limits>
3030
#include <functional>
3131

32+
#if !defined(_WIN32) || (_WIN32_WINNT >= _WIN32_WINNT_VISTA && !defined(__cplusplus_winrt))
3233
#include <boost/asio/ssl.hpp>
34+
#endif
3335

3436
#include "cpprest/http_msg.h"
3537

Release/src/http/listener/http_server_asio.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -505,11 +505,11 @@ void connection::async_read(CompletionCondition &&condition, Handler &&read_hand
505505
{
506506
if (m_ssl_stream)
507507
{
508-
boost::asio::async_read(*m_ssl_stream, m_request_buf, condition, read_handler);
508+
boost::asio::async_read(*m_ssl_stream, m_request_buf, std::forward<CompletionCondition>(condition), std::forward<Handler>(read_handler));
509509
}
510510
else
511511
{
512-
boost::asio::async_read(*m_socket, m_request_buf, condition, read_handler);
512+
boost::asio::async_read(*m_socket, m_request_buf, std::forward<CompletionCondition>(condition), std::forward<Handler>(read_handler));
513513
}
514514
}
515515

0 commit comments

Comments
 (0)