mirror of
https://github.com/OpenRCT2/OpenRCT2
synced 2026-01-22 22:34:33 +01:00
Rename snake_case functions in openrct2/src folder
Co-authored-by: duncanspumpkin <duncans_pumpkin@hotmail.co.uk>
This commit is contained in:
@@ -92,7 +92,7 @@ std::optional<ServerListEntry> ServerListEntry::FromJson(json_t& server)
|
||||
|
||||
if (name.empty() || version.empty())
|
||||
{
|
||||
log_verbose("Cowardly refusing to add server without name or version specified.");
|
||||
LOG_VERBOSE("Cowardly refusing to add server without name or version specified.");
|
||||
|
||||
return std::nullopt;
|
||||
}
|
||||
@@ -184,7 +184,7 @@ void ServerList::Clear() noexcept
|
||||
|
||||
std::vector<ServerListEntry> ServerList::ReadFavourites() const
|
||||
{
|
||||
log_verbose("server_list_read(...)");
|
||||
LOG_VERBOSE("server_list_read(...)");
|
||||
std::vector<ServerListEntry> entries;
|
||||
try
|
||||
{
|
||||
@@ -211,7 +211,7 @@ std::vector<ServerListEntry> ServerList::ReadFavourites() const
|
||||
}
|
||||
catch (const std::exception& e)
|
||||
{
|
||||
log_error("Unable to read server list: %s", e.what());
|
||||
LOG_ERROR("Unable to read server list: %s", e.what());
|
||||
entries = std::vector<ServerListEntry>();
|
||||
}
|
||||
return entries;
|
||||
@@ -239,7 +239,7 @@ void ServerList::WriteFavourites() const
|
||||
|
||||
bool ServerList::WriteFavourites(const std::vector<ServerListEntry>& entries) const
|
||||
{
|
||||
log_verbose("server_list_write(%d, 0x%p)", entries.size(), entries.data());
|
||||
LOG_VERBOSE("server_list_write(%d, 0x%p)", entries.size(), entries.data());
|
||||
|
||||
auto env = GetContext()->GetPlatformEnvironment();
|
||||
auto path = Path::Combine(env->GetDirectoryPath(DIRBASE::USER), u8"servers.cfg");
|
||||
@@ -258,7 +258,7 @@ bool ServerList::WriteFavourites(const std::vector<ServerListEntry>& entries) co
|
||||
}
|
||||
catch (const std::exception& e)
|
||||
{
|
||||
log_error("Unable to write server list: %s", e.what());
|
||||
LOG_ERROR("Unable to write server list: %s", e.what());
|
||||
return false;
|
||||
}
|
||||
}
|
||||
@@ -273,7 +273,7 @@ std::future<std::vector<ServerListEntry>> ServerList::FetchLocalServerListAsync(
|
||||
std::string_view msg = NETWORK_LAN_BROADCAST_MSG;
|
||||
auto udpSocket = CreateUdpSocket();
|
||||
|
||||
log_verbose("Broadcasting %zu bytes to the LAN (%s)", msg.size(), broadcastAddress.c_str());
|
||||
LOG_VERBOSE("Broadcasting %zu bytes to the LAN (%s)", msg.size(), broadcastAddress.c_str());
|
||||
auto len = udpSocket->SendData(broadcastAddress, NETWORK_LAN_BROADCAST_PORT, msg.data(), msg.size());
|
||||
if (len != msg.size())
|
||||
{
|
||||
@@ -293,7 +293,7 @@ std::future<std::vector<ServerListEntry>> ServerList::FetchLocalServerListAsync(
|
||||
if (p == NetworkReadPacket::Success)
|
||||
{
|
||||
auto sender = endpoint->GetHostname();
|
||||
log_verbose("Received %zu bytes back from %s", recievedLen, sender.c_str());
|
||||
LOG_VERBOSE("Received %zu bytes back from %s", recievedLen, sender.c_str());
|
||||
auto jinfo = Json::FromString(std::string_view(buffer));
|
||||
|
||||
if (jinfo.is_object())
|
||||
@@ -311,7 +311,7 @@ std::future<std::vector<ServerListEntry>> ServerList::FetchLocalServerListAsync(
|
||||
}
|
||||
catch (const std::exception& e)
|
||||
{
|
||||
log_warning("Error receiving data: %s", e.what());
|
||||
LOG_WARNING("Error receiving data: %s", e.what());
|
||||
}
|
||||
Platform::Sleep(RECV_DELAY_MS);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user