From ac3e87822afb6065a82dfe547ecbc0c307a04147 Mon Sep 17 00:00:00 2001 From: Egor Pugin Date: Wed, 4 Jul 2018 19:27:20 +0300 Subject: Remove string literal. --- src/net/HttpClient.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'src/net') diff --git a/src/net/HttpClient.cpp b/src/net/HttpClient.cpp index 479b72a..b61285c 100644 --- a/src/net/HttpClient.cpp +++ b/src/net/HttpClient.cpp @@ -32,7 +32,7 @@ using namespace boost::asio::ip; namespace TgBot { BoostHttpClient& BoostHttpClient::getInstance() { - static BoostHttpClient result; + static BoostHttpClient result; return result; } @@ -78,7 +78,7 @@ string BoostHttpClient::makeRequest(const Url& url, const vector& ar #else char buff[1024]; #endif //TGBOT_CHANGE_READ_BUFFER_SIZE - + boost::system::error_code error; while (!error) { size_t bytes = read(socket, buffer(buff), error); @@ -138,7 +138,7 @@ string CurlHttpClient::makeRequest(const Url& url, const vector& arg curl_easy_cleanup(curl); if (res != CURLE_OK) - throw std::runtime_error("curl error: "s + curl_easy_strerror(res)); + throw std::runtime_error(std::string("curl error: ") + curl_easy_strerror(res)); if (http_code != 200) throw std::runtime_error("curl request returned with code = " + std::to_string(http_code)); -- cgit v1.2.3