Core/OpenMode: Rename ReadOnly/WriteOnly to Read/Write

This commit is contained in:
Lynix
2023-12-25 19:49:03 +01:00
parent 754a3d3614
commit 4065fbfb1a
24 changed files with 42 additions and 42 deletions

View File

@@ -89,21 +89,21 @@ aiFile* StreamOpener(aiFileIO* fileIO, const char* filePath, const char* openMod
if (std::strchr(openMode, 'r'))
{
openModeEnum |= OpenMode::ReadOnly;
openModeEnum |= OpenMode::Read;
if (std::strchr(openMode, '+'))
openModeEnum |= OpenMode_ReadWrite | OpenMode::MustExist;
}
else if (std::strchr(openMode, 'w'))
{
openModeEnum |= OpenMode::WriteOnly | OpenMode::Truncate;
openModeEnum |= OpenMode::Write | OpenMode::Truncate;
if (std::strchr(openMode, '+'))
openModeEnum |= OpenMode::ReadOnly;
openModeEnum |= OpenMode::Read;
}
else if (std::strchr(openMode, 'a'))
{
openModeEnum |= OpenMode::WriteOnly | OpenMode::Append;
openModeEnum |= OpenMode::Write | OpenMode::Append;
if (std::strchr(openMode, '+'))
openModeEnum |= OpenMode::ReadOnly;
openModeEnum |= OpenMode::Read;
}
else
{

View File

@@ -284,7 +284,7 @@ namespace
bool SetFile(const std::filesystem::path& filePath)
{
std::unique_ptr<Nz::File> file = std::make_unique<Nz::File>();
if (!file->Open(filePath, Nz::OpenMode::ReadOnly))
if (!file->Open(filePath, Nz::OpenMode::Read))
{
NazaraErrorFmt("failed to open stream from file: {0}", Nz::Error::GetLastError());
return false;