mirror of
https://github.com/yuzu-emu/yuzu-android.git
synced 2025-06-10 20:48:10 -05:00
core/CMakeLists: Make some warnings errors
Makes our error coverage a little more consistent across the board by applying it to Linux side of things as well. This also makes it more consistent with the warning settings in other libraries in the project. This also updates httplib to 0.7.9, as there are several warning cleanups made that allow us to enable several warnings as errors.
This commit is contained in:
@ -67,28 +67,25 @@ struct Client::Impl {
|
||||
const std::string& jwt = "", const std::string& username = "",
|
||||
const std::string& token = "") {
|
||||
if (cli == nullptr) {
|
||||
auto parsedUrl = LUrlParser::clParseURL::ParseURL(host);
|
||||
int port;
|
||||
const auto parsedUrl = LUrlParser::clParseURL::ParseURL(host);
|
||||
int port{};
|
||||
if (parsedUrl.m_Scheme == "http") {
|
||||
if (!parsedUrl.GetPort(&port)) {
|
||||
port = HTTP_PORT;
|
||||
}
|
||||
cli = std::make_unique<httplib::Client>(parsedUrl.m_Host.c_str(), port);
|
||||
} else if (parsedUrl.m_Scheme == "https") {
|
||||
if (!parsedUrl.GetPort(&port)) {
|
||||
port = HTTPS_PORT;
|
||||
}
|
||||
cli = std::make_unique<httplib::SSLClient>(parsedUrl.m_Host.c_str(), port);
|
||||
} else {
|
||||
LOG_ERROR(WebService, "Bad URL scheme {}", parsedUrl.m_Scheme);
|
||||
return WebResult{WebResult::Code::InvalidURL, "Bad URL scheme", ""};
|
||||
}
|
||||
cli = std::make_unique<httplib::Client>(parsedUrl.m_Host.c_str(), port);
|
||||
}
|
||||
if (cli == nullptr) {
|
||||
LOG_ERROR(WebService, "Invalid URL {}", host + path);
|
||||
return WebResult{WebResult::Code::InvalidURL, "Invalid URL", ""};
|
||||
}
|
||||
cli->set_timeout_sec(TIMEOUT_SECONDS);
|
||||
cli->set_connection_timeout(TIMEOUT_SECONDS);
|
||||
cli->set_read_timeout(TIMEOUT_SECONDS);
|
||||
cli->set_write_timeout(TIMEOUT_SECONDS);
|
||||
|
||||
httplib::Headers params;
|
||||
if (!jwt.empty()) {
|
||||
|
Reference in New Issue
Block a user