1
0
mirror of https://github.com/OpenRCT2/OpenRCT2 synced 2026-02-01 11:15:13 +01:00

Rename ADVERTISE_STATUS and its members

This commit is contained in:
Gymnasiast
2025-03-26 12:03:26 +01:00
parent 8d57f4d193
commit c7d38b29fc
2 changed files with 12 additions and 12 deletions

View File

@@ -59,7 +59,7 @@ private:
std::unique_ptr<IUdpSocket> _lanListener;
uint32_t _lastListenTime{};
ADVERTISE_STATUS _status = ADVERTISE_STATUS::UNREGISTERED;
AdvertiseStatus _status = AdvertiseStatus::unregistered;
#ifndef DISABLE_HTTP
uint32_t _lastAdvertiseTime = 0;
@@ -85,7 +85,7 @@ public:
#endif
}
ADVERTISE_STATUS GetStatus() const override
AdvertiseStatus GetStatus() const override
{
return _status;
}
@@ -147,7 +147,7 @@ private:
{
switch (_status)
{
case ADVERTISE_STATUS::UNREGISTERED:
case AdvertiseStatus::unregistered:
if (_lastAdvertiseTime == 0 || Platform::GetTicks() > _lastAdvertiseTime + kMasterServerRegisterTime)
{
if (_lastAdvertiseTime == 0)
@@ -157,14 +157,14 @@ private:
SendRegistration(_forceIPv4);
}
break;
case ADVERTISE_STATUS::REGISTERED:
case AdvertiseStatus::registered:
if (Platform::GetTicks() > _lastHeartbeatTime + kMasterServerHeartbeatTime)
{
SendHeartbeat();
}
break;
// exhaust enum values to satisfy clang
case ADVERTISE_STATUS::DISABLED:
case AdvertiseStatus::disabled:
break;
}
}
@@ -246,7 +246,7 @@ private:
if (jsonToken.is_string())
{
_token = Json::GetString(jsonToken);
_status = ADVERTISE_STATUS::REGISTERED;
_status = AdvertiseStatus::registered;
}
}
else
@@ -288,7 +288,7 @@ private:
}
else if (status == MasterServerStatus::InvalidToken)
{
_status = ADVERTISE_STATUS::UNREGISTERED;
_status = AdvertiseStatus::unregistered;
_lastAdvertiseTime = 0;
Console::Error::WriteLine("Master server heartbeat failed: Invalid Token");
}

View File

@@ -11,11 +11,11 @@
#include <memory>
enum class ADVERTISE_STATUS
enum class AdvertiseStatus
{
DISABLED,
UNREGISTERED,
REGISTERED,
disabled,
unregistered,
registered,
};
struct INetworkServerAdvertiser
@@ -24,7 +24,7 @@ struct INetworkServerAdvertiser
{
}
virtual ADVERTISE_STATUS GetStatus() const = 0;
virtual AdvertiseStatus GetStatus() const = 0;
virtual void Update() = 0;
};