From 6f98457888bf85a6975b960af34f802450fab8e1 Mon Sep 17 00:00:00 2001 From: PabloMK7 Date: Wed, 4 Oct 2023 22:57:00 +0200 Subject: [PATCH] Apply more suggestions --- src/core/hle/service/http/http_c.cpp | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/src/core/hle/service/http/http_c.cpp b/src/core/hle/service/http/http_c.cpp index 4776cbc73f..64ef1cd722 100644 --- a/src/core/hle/service/http/http_c.cpp +++ b/src/core/hle/service/http/http_c.cpp @@ -117,11 +117,16 @@ static URLInfo SplitUrl(const std::string& url) { if (port == -1) { port = is_https ? default_https_port : default_http_port; } - return URLInfo{.is_https = is_https, .host = host, .port = port, .path = path}; + return URLInfo{ + .is_https = is_https, + .host = host, + .port = port, + .path = path, + }; } static ssize_t WriteHeaders(httplib::Stream& strm, - const std::vector& headers) { + std::span headers) { ssize_t write_len = 0; for (const auto& x : headers) { auto len = strm.write_format("%s: %s\r\n", x.name.c_str(), x.value.c_str()); @@ -193,7 +198,7 @@ void Context::MakeRequest() { {RequestMethod::PutEmpty, "PUT"}, }; - URLInfo url_info = SplitUrl(url.c_str()); + URLInfo url_info = SplitUrl(url); httplib::Request request; httplib::Error error{-1};