Convert all remaining enums to enum classes (!)
This commit is contained in:
@@ -30,7 +30,7 @@ namespace Nz
|
||||
return Ternary::False;
|
||||
|
||||
ByteStream byteStream(&stream);
|
||||
byteStream.SetDataEndianness(Endianness_LittleEndian);
|
||||
byteStream.SetDataEndianness(Endianness::LittleEndian);
|
||||
|
||||
UInt32 magic;
|
||||
byteStream >> magic;
|
||||
@@ -43,7 +43,7 @@ namespace Nz
|
||||
NazaraUnused(parameters);
|
||||
|
||||
ByteStream byteStream(&stream);
|
||||
byteStream.SetDataEndianness(Endianness_LittleEndian);
|
||||
byteStream.SetDataEndianness(Endianness::LittleEndian);
|
||||
|
||||
UInt32 magic;
|
||||
byteStream >> magic;
|
||||
|
||||
@@ -324,7 +324,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::ReadOnly))
|
||||
{
|
||||
NazaraError("Failed to open stream from file: " + Error::GetLastError());
|
||||
return false;
|
||||
|
||||
@@ -25,7 +25,7 @@ namespace Nz
|
||||
MD5AnimParser::~MD5AnimParser()
|
||||
{
|
||||
// Reset stream flags
|
||||
if ((m_streamFlags & StreamOption_Text) == 0)
|
||||
if ((m_streamFlags & StreamOption::Text) == 0)
|
||||
m_stream.EnableTextMode(false);
|
||||
}
|
||||
|
||||
|
||||
@@ -25,7 +25,7 @@ namespace Nz
|
||||
MD5MeshParser::~MD5MeshParser()
|
||||
{
|
||||
// Reset stream flags
|
||||
if ((m_streamFlags & StreamOption_Text) == 0)
|
||||
if ((m_streamFlags & StreamOption::Text) == 0)
|
||||
m_stream.EnableTextMode(false);
|
||||
}
|
||||
|
||||
|
||||
@@ -35,7 +35,7 @@ namespace Nz
|
||||
|
||||
// Force stream in text mode, reset it at the end
|
||||
Nz::CallOnExit resetTextMode;
|
||||
if ((stream.GetStreamOptions() & StreamOption_Text) == 0)
|
||||
if ((stream.GetStreamOptions() & StreamOption::Text) == 0)
|
||||
{
|
||||
stream.EnableTextMode(true);
|
||||
|
||||
@@ -490,7 +490,7 @@ namespace Nz
|
||||
|
||||
// Force stream in text mode, reset it at the end
|
||||
Nz::CallOnExit resetTextMode;
|
||||
if ((stream.GetStreamOptions() & StreamOption_Text) == 0)
|
||||
if ((stream.GetStreamOptions() & StreamOption::Text) == 0)
|
||||
{
|
||||
stream.EnableTextMode(true);
|
||||
|
||||
|
||||
@@ -45,7 +45,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::ReadOnly | OpenMode::Text))
|
||||
{
|
||||
NazaraError("Failed to open MTL file (" + file.GetPath().generic_u8string() + ')');
|
||||
return false;
|
||||
@@ -344,7 +344,7 @@ namespace Nz
|
||||
std::filesystem::path mtlLib = parser.GetMtlLib();
|
||||
if (!mtlLib.empty())
|
||||
{
|
||||
ErrorFlags flags(ErrorFlag_ThrowExceptionDisabled);
|
||||
ErrorFlags flags(ErrorMode::ThrowExceptionDisabled);
|
||||
ParseMTL(*mesh, stream.GetDirectory() / mtlLib, materials, meshes, meshCount);
|
||||
}
|
||||
|
||||
|
||||
@@ -23,7 +23,7 @@ namespace Nz
|
||||
|
||||
// Force stream in text mode, reset it at the end
|
||||
Nz::CallOnExit resetTextMode;
|
||||
if ((stream.GetStreamOptions() & StreamOption_Text) == 0)
|
||||
if ((stream.GetStreamOptions() & StreamOption::Text) == 0)
|
||||
{
|
||||
stream.EnableTextMode(true);
|
||||
|
||||
@@ -95,7 +95,7 @@ namespace Nz
|
||||
|
||||
// Force stream in text mode, reset it at the end
|
||||
Nz::CallOnExit resetTextMode;
|
||||
if ((stream.GetStreamOptions() & StreamOption_Text) == 0)
|
||||
if ((stream.GetStreamOptions() & StreamOption::Text) == 0)
|
||||
{
|
||||
stream.EnableTextMode(true);
|
||||
|
||||
@@ -493,7 +493,7 @@ namespace Nz
|
||||
|
||||
// Force stream in text mode, reset it at the end
|
||||
Nz::CallOnExit resetTextMode;
|
||||
if ((stream.GetStreamOptions() & StreamOption_Text) == 0)
|
||||
if ((stream.GetStreamOptions() & StreamOption::Text) == 0)
|
||||
{
|
||||
stream.EnableTextMode(true);
|
||||
|
||||
|
||||
@@ -190,7 +190,7 @@ namespace Nz
|
||||
|
||||
if (!mtlPath.empty())
|
||||
{
|
||||
File mtlFile(mtlPath, OpenMode_WriteOnly | OpenMode_Truncate);
|
||||
File mtlFile(mtlPath, OpenMode::WriteOnly | OpenMode::Truncate);
|
||||
if (mtlFile.IsOpen())
|
||||
mtlFormat.Save(mtlFile);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user