Make use of the new EnumMap class
This commit is contained in:
@@ -12,6 +12,7 @@
|
||||
#include <Nazara/Platform/Config.hpp>
|
||||
#include <Nazara/Platform/Enums.hpp>
|
||||
#include <Nazara/Utility/Image.hpp>
|
||||
#include <NazaraUtils/EnumMap.hpp>
|
||||
#include <array>
|
||||
|
||||
namespace Nz
|
||||
@@ -53,7 +54,7 @@ namespace Nz
|
||||
SystemCursor m_systemCursor;
|
||||
std::unique_ptr<CursorImpl> m_impl;
|
||||
|
||||
static std::array<std::shared_ptr<Cursor>, SystemCursorCount> s_systemCursors;
|
||||
static EnumMap<SystemCursor, std::shared_ptr<Cursor>> s_systemCursors;
|
||||
};
|
||||
}
|
||||
|
||||
|
||||
@@ -20,7 +20,7 @@ namespace Nz
|
||||
|
||||
inline std::shared_ptr<Cursor>& Cursor::Get(SystemCursor cursor)
|
||||
{
|
||||
return s_systemCursors[UnderlyingCast(cursor)];
|
||||
return s_systemCursors[cursor];
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user