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

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

View File

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

View File

@@ -30,7 +30,7 @@ namespace Nz
bool ParseMTL(Mesh& mesh, const std::filesystem::path& filePath, const std::string* materials, const OBJParser::Mesh* meshes, std::size_t meshCount)
{
File file(filePath);
if (!file.Open(OpenMode::ReadOnly | OpenMode::Text))
if (!file.Open(OpenMode::Read | OpenMode::Text))
{
NazaraErrorFmt("failed to open MTL file ({0})", file.GetPath());
return false;

View File

@@ -208,7 +208,7 @@ namespace Nz
if (!mtlPath.empty())
{
File mtlFile(mtlPath, OpenMode::WriteOnly | OpenMode::Truncate);
File mtlFile(mtlPath, OpenMode::Write | OpenMode::Truncate);
if (mtlFile.IsOpen())
mtlFormat.Save(mtlFile);
}