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