1
0
mirror of https://github.com/OpenRCT2/OpenRCT2 synced 2026-01-20 05:23:04 +01:00

Create enum class for FileMode

This commit is contained in:
Gymnasiast
2025-03-25 18:23:36 +01:00
parent 0dfc94799a
commit c5fff2bb77
29 changed files with 67 additions and 67 deletions

View File

@@ -302,7 +302,7 @@ bool NetworkBase::BeginClient(const std::string& host, uint16_t port)
try
{
auto fs = FileStream(keyPath, FILE_MODE_WRITE);
auto fs = FileStream(keyPath, FileMode::write);
_key.SavePrivate(&fs);
}
catch (const std::exception&)
@@ -318,7 +318,7 @@ bool NetworkBase::BeginClient(const std::string& host, uint16_t port)
try
{
auto fs = FileStream(keyPath, FILE_MODE_WRITE);
auto fs = FileStream(keyPath, FileMode::write);
_key.SavePublic(&fs);
}
catch (const std::exception&)
@@ -334,7 +334,7 @@ bool NetworkBase::BeginClient(const std::string& host, uint16_t port)
try
{
LOG_VERBOSE("Loading key from %s", keyPath.c_str());
auto fs = FileStream(keyPath, FILE_MODE_OPEN);
auto fs = FileStream(keyPath, FileMode::open);
ok = _key.LoadPrivate(&fs);
}
catch (const std::exception&)
@@ -2212,7 +2212,7 @@ void NetworkBase::Client_Handle_TOKEN(NetworkConnection& connection, NetworkPack
try
{
auto fs = FileStream(keyPath, FILE_MODE_OPEN);
auto fs = FileStream(keyPath, FileMode::open);
if (!_key.LoadPrivate(&fs))
{
throw std::runtime_error("Failed to load private key.");
@@ -3972,7 +3972,7 @@ void NetworkSendPassword(const std::string& password)
}
try
{
auto fs = FileStream(keyPath, FILE_MODE_OPEN);
auto fs = FileStream(keyPath, FileMode::open);
network._key.LoadPrivate(&fs);
}
catch (const std::exception&)