From 421a58e42dfbbbe9a321f06c0b12080da35c857c Mon Sep 17 00:00:00 2001 From: Martin Ridgers Date: Fri, 26 Nov 2021 08:34:48 +0100 Subject: ASIO error type is asio::error_code not std::error_code --- zenserver-test/zenserver-test.cpp | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) (limited to 'zenserver-test/zenserver-test.cpp') diff --git a/zenserver-test/zenserver-test.cpp b/zenserver-test/zenserver-test.cpp index 139a43981..3aeef8cba 100644 --- a/zenserver-test/zenserver-test.cpp +++ b/zenserver-test/zenserver-test.cpp @@ -163,7 +163,7 @@ public: private: void Reset() {} - void OnError(const std::error_code& Error) + void OnError(const asio::error_code& Error) { using namespace fmt::literals; zen::ThrowLastError("HTTP client error! '{}'"_format(Error.message())); @@ -209,7 +209,7 @@ private: // Send initial request payload asio::async_write(m_Socket, asio::const_buffer(m_RequestBody.data(), m_RequestBody.size()), - [this](const std::error_code& Error, size_t Bytes) { + [this](const asio::error_code& Error, size_t Bytes) { ZEN_UNUSED(Bytes); if (Error) { @@ -222,7 +222,7 @@ private: void OnRequestWritten() { - asio::async_read(m_Socket, m_ResponseBuffer, asio::transfer_at_least(1), [this](const std::error_code& Error, size_t Bytes) { + asio::async_read(m_Socket, m_ResponseBuffer, asio::transfer_at_least(1), [this](const asio::error_code& Error, size_t Bytes) { if (Error) { return OnError(Error); @@ -253,7 +253,7 @@ private: asio::async_read(m_Socket, m_ResponseBuffer, asio::transfer_at_least(1), - [this](const std::error_code& Error, size_t Bytes) { + [this](const asio::error_code& Error, size_t Bytes) { if (Error) { return OnError(Error); @@ -347,9 +347,9 @@ HttpConnectionPool::GetConnection() asio::ip::tcp::resolver Resolver{m_Context}; - std::error_code ErrCode; - auto it = Resolver.resolve(m_HostName, Service, ErrCode); - auto itEnd = asio::ip::tcp::resolver::iterator(); + asio::error_code ErrCode; + auto it = Resolver.resolve(m_HostName, Service, ErrCode); + auto itEnd = asio::ip::tcp::resolver::iterator(); if (ErrCode) { -- cgit v1.2.3