Rename members of Http::Status

This commit is contained in:
Gymnasiast committed 2026-08-07 06:57:35 +02:00
1 parent 8ae5221c6b
commit 6d8c65ba5f
8 files changed
+14 -14

No files matched your search

+3 -3
View File
@@ -175,7 +175,7 @@ namespace OpenRCT2::Ui::Windows
req.method = Http::Method::GET;
req.url = url;
Http::DoAsync(req, [this, entry, name](Http::Response response) {
if (response.status == Http::Status::Ok)
if (response.status == Http::Status::ok)
{
// Check that download operation hasn't been cancelled
if (_downloadingObjects)
@@ -225,7 +225,7 @@ namespace OpenRCT2::Ui::Windows
req.method = Http::Method::GET;
req.url = kOpenRCT2ApiLegacyObjectURL + name;
Http::DoAsync(req, [this, entry, name](Http::Response response) {
if (response.status == Http::Status::Ok)
if (response.status == Http::Status::ok)
{
auto jresponse = Json::FromString(response.body);
if (jresponse.is_object())
@@ -241,7 +241,7 @@ namespace OpenRCT2::Ui::Windows
}
}
}
else if (response.status == Http::Status::NotFound)
else if (response.status == Http::Status::notFound)
{
Console::Error::WriteLine(" %s not found", name.c_str());
QueueNextDownload();
+1 -1
View File
@@ -1495,7 +1495,7 @@ namespace OpenRCT2
try
{
res = Do(request);
if (res.status != Http::Status::Ok)
if (res.status != Http::Status::ok)
throw std::runtime_error("bad http status");
}
catch (std::exception& e)
+1 -1
View File
@@ -92,7 +92,7 @@ NewVersionInfo GetLatestVersion()
try
{
res = Do(request);
if (res.status != Http::Status::Ok)
if (res.status != Http::Status::ok)
throw std::runtime_error("bad http status");
}
catch (std::exception& e)
+1 -1
View File
@@ -238,7 +238,7 @@ namespace OpenRCT2::Http
WinHttpCloseHandle(hRequest);
Response response;
response.status = Status::Error;
response.status = Status::error;
response.error = e.what();
return response;
}
+1 -1
View File
@@ -163,7 +163,7 @@ namespace OpenRCT2::Http
catch (const std::exception& e)
{
Response response;
response.status = Status::Error;
response.status = Status::error;
response.error = e.what();
return response;
}
+4 -4
View File
@@ -20,10 +20,10 @@ namespace OpenRCT2::Http
{
enum class Status
{
Invalid = 0,
Error = 1,
Ok = 200,
NotFound = 404
invalid = 0,
error = 1,
ok = 200,
notFound = 404
};
enum class Method
@@ -201,7 +201,7 @@ namespace OpenRCT2::Network
request.header["Content-Type"] = "application/json";
_currentRequest = Http::DoAsync(request, [&](Http::Response response) -> void {
if (response.status != Http::Status::Ok)
if (response.status != Http::Status::ok)
{
Console::Error::WriteLine(
"Unable to connect to master server, retrying in %d seconds",
@@ -230,7 +230,7 @@ namespace OpenRCT2::Network
_lastHeartbeatTime = Platform::GetTicks();
_currentRequest = Http::DoAsync(request, [&](Http::Response response) -> void {
if (response.status != Http::Status::Ok)
if (response.status != Http::Status::ok)
{
Console::Error::WriteLine(
"Unable to connect to master server, retrying in %d seconds",
+1 -1
View File
@@ -376,7 +376,7 @@ namespace OpenRCT2::Network
json_t root;
try
{
if (response.status != Http::Status::Ok)
if (response.status != Http::Status::ok)
{
throw MasterServerException(STR_SERVER_LIST_NO_CONNECTION);
}