Core/OpenMode: Rename ReadOnly/WriteOnly to Read/Write
This commit is contained in:
@@ -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
|
||||
{
|
||||
|
||||
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user