Fixes #291 : added missing inline keyword to make_work_guard

This commit is contained in:
eidheim 2020-02-28 11:35:57 +01:00
commit 4d3ca3c1c0

View file

@ -50,7 +50,7 @@ namespace SimpleWeb {
void async_resolve(asio::ip::tcp::resolver &resolver, const std::pair<std::string, std::string> &host_port, handler_type &&handler) { void async_resolve(asio::ip::tcp::resolver &resolver, const std::pair<std::string, std::string> &host_port, handler_type &&handler) {
resolver.async_resolve(host_port.first, host_port.second, std::forward<handler_type>(handler)); resolver.async_resolve(host_port.first, host_port.second, std::forward<handler_type>(handler));
} }
asio::executor_work_guard<io_context::executor_type> make_work_guard(io_context &context) { inline asio::executor_work_guard<io_context::executor_type> make_work_guard(io_context &context) {
return asio::make_work_guard(context); return asio::make_work_guard(context);
} }
#else #else
@ -76,7 +76,7 @@ namespace SimpleWeb {
void async_resolve(asio::ip::tcp::resolver &resolver, const std::pair<std::string, std::string> &host_port, handler_type &&handler) { void async_resolve(asio::ip::tcp::resolver &resolver, const std::pair<std::string, std::string> &host_port, handler_type &&handler) {
resolver.async_resolve(asio::ip::tcp::resolver::query(host_port.first, host_port.second), std::forward<handler_type>(handler)); resolver.async_resolve(asio::ip::tcp::resolver::query(host_port.first, host_port.second), std::forward<handler_type>(handler));
} }
io_context::work make_work_guard(io_context &context) { inline io_context::work make_work_guard(io_context &context) {
return io_context::work(context); return io_context::work(context);
} }
#endif #endif