Convert all remaining enums to enum classes (!)

This commit is contained in:
Jérôme Leclercq
2021-05-25 00:08:50 +02:00
parent 8cdd0b51cb
commit 874fb3542e
122 changed files with 1082 additions and 2169 deletions

View File

@@ -13,13 +13,13 @@ namespace Nz
Cursor::Cursor(const Image& cursor, const Vector2i& hotSpot, SystemCursor placeholder)
{
ErrorFlags flags(ErrorFlag_ThrowException, true);
ErrorFlags flags(ErrorMode::ThrowException, true);
Create(cursor, hotSpot, placeholder);
}
Cursor::Cursor(SystemCursor systemCursor)
{
ErrorFlags flags(ErrorFlag_ThrowException, true);
ErrorFlags flags(ErrorMode::ThrowException, true);
Create(systemCursor);
}

View File

@@ -12,7 +12,7 @@ namespace Nz
Icon::Icon(const Image& icon)
{
ErrorFlags flags(ErrorFlag_ThrowException, true);
ErrorFlags flags(ErrorMode::ThrowException, true);
Create(icon);
}

View File

@@ -39,7 +39,7 @@ namespace Nz
CursorImpl::CursorImpl(const Image& cursor, const Vector2i& hotSpot)
{
ErrorFlags errFlags(ErrorFlag_ThrowException);
ErrorFlags errFlags(ErrorMode::ThrowException);
m_cursorImage = cursor;
if (!m_cursorImage.Convert(PixelFormat::BGRA8))
@@ -69,7 +69,7 @@ namespace Nz
CursorImpl::CursorImpl(SystemCursor cursor)
{
ErrorFlags errFlags(ErrorFlag_ThrowException);
ErrorFlags errFlags(ErrorMode::ThrowException);
if (cursor != SystemCursor::None)
{

View File

@@ -12,7 +12,7 @@ namespace Nz
{
IconImpl::IconImpl(const Image& icon)
{
ErrorFlags errFlags(ErrorFlag_ThrowException);
ErrorFlags errFlags(ErrorMode::ThrowException);
m_iconImage = icon;
if (!m_iconImage.Convert(PixelFormat::BGRA8))

View File

@@ -198,7 +198,7 @@ namespace Nz
if (SDL_GetWindowWMInfo(m_handle, &wmInfo) != SDL_TRUE)
{
ErrorFlags flags(ErrorFlag_ThrowException, true);
ErrorFlags flags(ErrorMode::ThrowException, true);
NazaraError(std::string("failed to retrieve window manager info: ") + SDL_GetError());
}
@@ -235,7 +235,7 @@ namespace Nz
#endif
default:
{
ErrorFlags flags(ErrorFlag_ThrowException, true);
ErrorFlags flags(ErrorMode::ThrowException, true);
NazaraError("unhandled window subsystem");
}
}