mirror of
https://git.h3cjp.net/H3cJP/citra.git
synced 2024-11-24 21:02:55 +00:00
Apply more suggestions
This commit is contained in:
parent
937ffb267c
commit
6f98457888
|
@ -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<Context::RequestHeader>& headers) {
|
||||
std::span<const Context::RequestHeader> 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};
|
||||
|
|
Loading…
Reference in a new issue