From e8b5f4b7fcf81541496f409436981a9899fad265 Mon Sep 17 00:00:00 2001 From: momo5502 Date: Tue, 16 May 2023 07:13:38 +0200 Subject: [PATCH] Fix formatting --- src/common/utils/http.cpp | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/src/common/utils/http.cpp b/src/common/utils/http.cpp index a208ac67..cc308be3 100644 --- a/src/common/utils/http.cpp +++ b/src/common/utils/http.cpp @@ -15,7 +15,7 @@ namespace utils::http }; int progress_callback(void* clientp, const curl_off_t /*dltotal*/, const curl_off_t dlnow, - const curl_off_t /*ultotal*/, const curl_off_t /*ulnow*/) + const curl_off_t /*ultotal*/, const curl_off_t /*ulnow*/) { auto* helper = static_cast(clientp); @@ -46,7 +46,7 @@ namespace utils::http } std::optional get_data(const std::string& url, const headers& headers, - const std::function& callback, const uint32_t retries) + const std::function& callback, const uint32_t retries) { curl_slist* header_list = nullptr; auto* curl = curl_easy_init(); @@ -56,10 +56,10 @@ namespace utils::http } auto _ = utils::finally([&]() - { - curl_slist_free_all(header_list); - curl_easy_cleanup(curl); - }); + { + curl_slist_free_all(header_list); + curl_easy_cleanup(curl); + }); for (const auto& header : headers) { @@ -94,7 +94,7 @@ namespace utils::http if (http_code >= 200) { - return { std::move(buffer) }; + return {std::move(buffer)}; } throw std::runtime_error( @@ -121,8 +121,8 @@ namespace utils::http std::future> get_data_async(const std::string& url, const headers& headers) { return std::async(std::launch::async, [url, headers]() - { - return get_data(url, headers); - }); + { + return get_data(url, headers); + }); } }