Rename EnumMap to EnumArray after nazarautils update
This commit is contained in:
@@ -15,7 +15,7 @@
|
||||
#include <Nazara/Audio/Enums.hpp>
|
||||
#include <Nazara/Audio/OpenAL.hpp>
|
||||
#include <Nazara/Core/Algorithm.hpp>
|
||||
#include <NazaraUtils/EnumMap.hpp>
|
||||
#include <NazaraUtils/EnumArray.hpp>
|
||||
#include <NazaraUtils/MovablePtr.hpp>
|
||||
#include <array>
|
||||
#include <string>
|
||||
@@ -71,8 +71,8 @@ namespace Nz
|
||||
OpenALDevice& operator=(OpenALDevice&&) = delete;
|
||||
|
||||
private:
|
||||
EnumMap<AudioFormat, ALenum> m_audioFormatValues;
|
||||
EnumMap<OpenALExtension, ALenum> m_extensionStatus;
|
||||
EnumArray<AudioFormat, ALenum> m_audioFormatValues;
|
||||
EnumArray<OpenALExtension, ALenum> m_extensionStatus;
|
||||
std::string m_renderer;
|
||||
std::string m_vendor;
|
||||
OpenALLibrary& m_library;
|
||||
|
||||
@@ -10,7 +10,7 @@
|
||||
#include <NazaraUtils/Prerequisites.hpp>
|
||||
#include <Nazara/Core/Config.hpp>
|
||||
#include <Nazara/Core/Enums.hpp>
|
||||
#include <NazaraUtils/EnumMap.hpp>
|
||||
#include <NazaraUtils/EnumArray.hpp>
|
||||
#include <array>
|
||||
#include <string_view>
|
||||
|
||||
@@ -43,7 +43,7 @@ namespace Nz
|
||||
void FetchMemoryInfo();
|
||||
|
||||
std::array<char, 3 * 4 * 4> m_cpuBrandString;
|
||||
EnumMap<ProcessorCap, bool> m_cpuCapabilities;
|
||||
EnumArray<ProcessorCap, bool> m_cpuCapabilities;
|
||||
ProcessorVendor m_cpuVendor;
|
||||
unsigned int m_cpuThreadCount;
|
||||
UInt64 m_systemTotalMemory;
|
||||
|
||||
@@ -78,8 +78,8 @@ namespace Nz
|
||||
|
||||
struct DefaultTextures
|
||||
{
|
||||
EnumMap<ImageType, std::shared_ptr<Texture>> depthTextures;
|
||||
EnumMap<ImageType, std::shared_ptr<Texture>> whiteTextures;
|
||||
EnumArray<ImageType, std::shared_ptr<Texture>> depthTextures;
|
||||
EnumArray<ImageType, std::shared_ptr<Texture>> whiteTextures;
|
||||
};
|
||||
|
||||
private:
|
||||
|
||||
@@ -97,7 +97,7 @@ namespace Nz
|
||||
std::vector<TextureData> m_textures;
|
||||
std::vector<UniformBlockData> m_uniformBlocks;
|
||||
mutable std::weak_ptr<MaterialInstance> m_defaultInstance;
|
||||
EnumMap<EngineShaderBinding, UInt32> m_engineShaderBindings;
|
||||
EnumArray<EngineShaderBinding, UInt32> m_engineShaderBindings;
|
||||
MaterialSettings m_settings;
|
||||
ShaderReflection m_reflection;
|
||||
};
|
||||
|
||||
@@ -50,7 +50,7 @@ namespace Nz
|
||||
private:
|
||||
inline void UpdateVertices();
|
||||
|
||||
EnumMap<RectCorner, Color> m_cornerColor;
|
||||
EnumArray<RectCorner, Color> m_cornerColor;
|
||||
std::array<VertexStruct_XYZ_Color_UV, 4> m_vertices;
|
||||
std::shared_ptr<MaterialInstance> m_material;
|
||||
Color m_color;
|
||||
|
||||
@@ -90,7 +90,7 @@ namespace Nz
|
||||
{
|
||||
VertexStruct_XYZ_Color_UV* vertices = m_vertices.data();
|
||||
|
||||
EnumMap<RectCorner, Vector2f> cornerExtent;
|
||||
EnumArray<RectCorner, Vector2f> cornerExtent;
|
||||
cornerExtent[RectCorner::LeftBottom] = Vector2f(0.f, 0.f);
|
||||
cornerExtent[RectCorner::RightBottom] = Vector2f(1.f, 0.f);
|
||||
cornerExtent[RectCorner::LeftTop] = Vector2f(0.f, 1.f);
|
||||
|
||||
@@ -15,7 +15,7 @@
|
||||
#include <Nazara/Math/Plane.hpp>
|
||||
#include <Nazara/Math/Sphere.hpp>
|
||||
#include <Nazara/Math/Vector3.hpp>
|
||||
#include <NazaraUtils/EnumMap.hpp>
|
||||
#include <NazaraUtils/EnumArray.hpp>
|
||||
#include <array>
|
||||
#include <string>
|
||||
|
||||
@@ -28,7 +28,7 @@ namespace Nz
|
||||
{
|
||||
public:
|
||||
Frustum() = default;
|
||||
explicit Frustum(const EnumMap<FrustumPlane, Plane<T>>& planes);
|
||||
explicit Frustum(const EnumArray<FrustumPlane, Plane<T>>& planes);
|
||||
template<typename U> explicit Frustum(const Frustum<U>& frustum);
|
||||
Frustum(const Frustum& frustum) = default;
|
||||
~Frustum() = default;
|
||||
@@ -64,7 +64,7 @@ namespace Nz
|
||||
friend bool Unserialize(SerializationContext& context, Frustum<U>* frustum, TypeTag<Frustum<U>>);
|
||||
|
||||
private:
|
||||
EnumMap<FrustumPlane, Plane<T>> m_planes;
|
||||
EnumArray<FrustumPlane, Plane<T>> m_planes;
|
||||
};
|
||||
|
||||
using Frustumd = Frustum<double>;
|
||||
|
||||
@@ -8,7 +8,7 @@
|
||||
|
||||
#include <Nazara/Core/Algorithm.hpp>
|
||||
#include <Nazara/Math/Algorithm.hpp>
|
||||
#include <NazaraUtils/EnumMap.hpp>
|
||||
#include <NazaraUtils/EnumArray.hpp>
|
||||
#include <cstring>
|
||||
#include <sstream>
|
||||
#include <Nazara/Core/Debug.hpp>
|
||||
@@ -31,7 +31,7 @@ namespace Nz
|
||||
* \param planes Frustum of type U to convert to type T
|
||||
*/
|
||||
template<typename T>
|
||||
Frustum<T>::Frustum(const EnumMap<FrustumPlane, Plane<T>>& planes) :
|
||||
Frustum<T>::Frustum(const EnumArray<FrustumPlane, Plane<T>>& planes) :
|
||||
m_planes(planes)
|
||||
{
|
||||
}
|
||||
@@ -419,7 +419,7 @@ namespace Nz
|
||||
Vector3<T> fc = eye + f * zFar;
|
||||
|
||||
// Computing the frustum
|
||||
EnumMap<BoxCorner, Vector3<T>> corners;
|
||||
EnumArray<BoxCorner, Vector3<T>> corners;
|
||||
corners[BoxCorner::FarLeftBottom] = fc - u * farH - s * farW;
|
||||
corners[BoxCorner::FarLeftTop] = fc + u * farH - s * farW;
|
||||
corners[BoxCorner::FarRightTop] = fc + u * farH + s * farW;
|
||||
@@ -432,7 +432,7 @@ namespace Nz
|
||||
|
||||
// Construction of frustum's planes
|
||||
|
||||
EnumMap<FrustumPlane, Plane<T>> planes;
|
||||
EnumArray<FrustumPlane, Plane<T>> planes;
|
||||
planes[FrustumPlane::Bottom] = Plane(corners[BoxCorner::NearLeftBottom], corners[BoxCorner::NearRightBottom], corners[BoxCorner::FarRightBottom]);
|
||||
planes[FrustumPlane::Far] = Plane(corners[BoxCorner::FarRightTop], corners[BoxCorner::FarLeftTop], corners[BoxCorner::FarLeftBottom]);
|
||||
planes[FrustumPlane::Left] = Plane(corners[BoxCorner::NearLeftTop], corners[BoxCorner::NearLeftBottom], corners[BoxCorner::FarLeftBottom]);
|
||||
@@ -456,7 +456,7 @@ namespace Nz
|
||||
T plane[4];
|
||||
T invLength;
|
||||
|
||||
EnumMap<FrustumPlane, Plane<T>> planes;
|
||||
EnumArray<FrustumPlane, Plane<T>> planes;
|
||||
|
||||
// Extract the numbers for the RIGHT plane
|
||||
plane[0] = viewProjMatrix[3] - viewProjMatrix[0];
|
||||
|
||||
@@ -11,7 +11,7 @@
|
||||
#include <Nazara/Math/Enums.hpp>
|
||||
#include <Nazara/Math/Matrix4.hpp>
|
||||
#include <Nazara/Math/Vector3.hpp>
|
||||
#include <NazaraUtils/EnumMap.hpp>
|
||||
#include <NazaraUtils/EnumArray.hpp>
|
||||
#include <string>
|
||||
|
||||
namespace Nz
|
||||
@@ -54,7 +54,7 @@ namespace Nz
|
||||
Box<T> localBox;
|
||||
|
||||
private:
|
||||
EnumMap<BoxCorner, Vector3<T>> m_corners;
|
||||
EnumArray<BoxCorner, Vector3<T>> m_corners;
|
||||
};
|
||||
|
||||
using OrientedBoxd = OrientedBox<double>;
|
||||
|
||||
@@ -16,7 +16,7 @@
|
||||
#include <Nazara/OpenGLRenderer/Wrapper/Loader.hpp>
|
||||
#include <Nazara/Renderer/Enums.hpp>
|
||||
#include <Nazara/Renderer/RenderStates.hpp>
|
||||
#include <NazaraUtils/EnumMap.hpp>
|
||||
#include <NazaraUtils/EnumArray.hpp>
|
||||
#include <array>
|
||||
#include <string>
|
||||
#include <unordered_set>
|
||||
@@ -257,10 +257,10 @@ namespace Nz::GL
|
||||
struct TextureUnit
|
||||
{
|
||||
GLuint sampler = 0;
|
||||
EnumMap<TextureTarget, GLuint> textureTargets = { 0 };
|
||||
EnumArray<TextureTarget, GLuint> textureTargets = { 0 };
|
||||
};
|
||||
|
||||
EnumMap<BufferTarget, GLuint> bufferTargets = { 0 };
|
||||
EnumArray<BufferTarget, GLuint> bufferTargets = { 0 };
|
||||
std::vector<BufferBinding> storageUnits;
|
||||
std::vector<BufferBinding> uboUnits;
|
||||
std::vector<ImageUnits> imageUnits;
|
||||
@@ -275,7 +275,7 @@ namespace Nz::GL
|
||||
RenderStates renderStates;
|
||||
};
|
||||
|
||||
EnumMap<Extension, ExtensionStatus> m_extensionStatus;
|
||||
EnumArray<Extension, ExtensionStatus> m_extensionStatus;
|
||||
std::array<GLFunction, UnderlyingCast(FunctionIndex::Count)> m_originalFunctionPointer;
|
||||
mutable std::unique_ptr<BlitFramebuffers> m_blitFramebuffers;
|
||||
std::unordered_set<std::string> m_supportedExtensions;
|
||||
|
||||
@@ -12,7 +12,7 @@
|
||||
#include <Nazara/Platform/Config.hpp>
|
||||
#include <Nazara/Platform/Enums.hpp>
|
||||
#include <Nazara/Utility/Image.hpp>
|
||||
#include <NazaraUtils/EnumMap.hpp>
|
||||
#include <NazaraUtils/EnumArray.hpp>
|
||||
#include <array>
|
||||
|
||||
namespace Nz
|
||||
@@ -54,7 +54,7 @@ namespace Nz
|
||||
SystemCursor m_systemCursor;
|
||||
std::unique_ptr<CursorImpl> m_impl;
|
||||
|
||||
static EnumMap<SystemCursor, std::shared_ptr<Cursor>> s_systemCursors;
|
||||
static EnumArray<SystemCursor, std::shared_ptr<Cursor>> s_systemCursors;
|
||||
};
|
||||
}
|
||||
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
// This file is part of the "Nazara Engine - Renderer module"
|
||||
// For conditions of distribution and use, see copyright notice in Config.hpp
|
||||
|
||||
#include <NazaraUtils/EnumMap.hpp>
|
||||
#include <NazaraUtils/EnumArray.hpp>
|
||||
#include <Nazara/Renderer/Debug.hpp>
|
||||
|
||||
namespace Nz
|
||||
@@ -28,7 +28,7 @@ namespace Nz
|
||||
|
||||
inline void DebugDrawer::DrawFrustum(const Frustumf& frustum, const Color& color)
|
||||
{
|
||||
EnumMap<BoxCorner, Vector3f> corners;
|
||||
EnumArray<BoxCorner, Vector3f> corners;
|
||||
for (auto&& [corner, pos] : corners.iter_kv())
|
||||
pos = frustum.ComputeCorner(corner);
|
||||
|
||||
|
||||
@@ -12,7 +12,7 @@
|
||||
#include <Nazara/Utility/Config.hpp>
|
||||
#include <Nazara/Utility/Enums.hpp>
|
||||
#include <NazaraUtils/Bitset.hpp>
|
||||
#include <NazaraUtils/EnumMap.hpp>
|
||||
#include <NazaraUtils/EnumArray.hpp>
|
||||
#include <array>
|
||||
#include <functional>
|
||||
|
||||
@@ -89,9 +89,9 @@ namespace Nz
|
||||
static bool Initialize();
|
||||
static void Uninitialize();
|
||||
|
||||
static EnumMap<PixelFormat, EnumMap<PixelFormat, ConvertFunction>> s_convertFunctions;
|
||||
static EnumMap<PixelFormat, EnumMap<PixelFlipping, FlipFunction>> s_flipFunctions;
|
||||
static EnumMap<PixelFormat, PixelFormatDescription> s_pixelFormatInfos;
|
||||
static EnumArray<PixelFormat, EnumArray<PixelFormat, ConvertFunction>> s_convertFunctions;
|
||||
static EnumArray<PixelFormat, EnumArray<PixelFlipping, FlipFunction>> s_flipFunctions;
|
||||
static EnumArray<PixelFormat, PixelFormatDescription> s_pixelFormatInfos;
|
||||
};
|
||||
}
|
||||
|
||||
|
||||
@@ -11,7 +11,7 @@
|
||||
#include <Nazara/Core/ObjectLibrary.hpp>
|
||||
#include <Nazara/Utility/Config.hpp>
|
||||
#include <Nazara/Utility/Enums.hpp>
|
||||
#include <NazaraUtils/EnumMap.hpp>
|
||||
#include <NazaraUtils/EnumArray.hpp>
|
||||
#include <NazaraUtils/SparsePtr.hpp>
|
||||
#include <array>
|
||||
#include <vector>
|
||||
@@ -78,7 +78,7 @@ namespace Nz
|
||||
std::size_t m_stride;
|
||||
VertexInputRate m_inputRate;
|
||||
|
||||
static EnumMap<VertexLayout, std::shared_ptr<VertexDeclaration>> s_declarations;
|
||||
static EnumArray<VertexLayout, std::shared_ptr<VertexDeclaration>> s_declarations;
|
||||
};
|
||||
}
|
||||
|
||||
|
||||
@@ -13,7 +13,7 @@
|
||||
#include <Nazara/VulkanRenderer/Config.hpp>
|
||||
#include <Nazara/VulkanRenderer/Wrapper/Loader.hpp>
|
||||
#include <Nazara/VulkanRenderer/Wrapper/PhysicalDevice.hpp>
|
||||
#include <NazaraUtils/EnumMap.hpp>
|
||||
#include <NazaraUtils/EnumArray.hpp>
|
||||
#include <vulkan/vulkan_core.h>
|
||||
#include <array>
|
||||
#include <memory>
|
||||
@@ -113,7 +113,7 @@ namespace Nz
|
||||
std::vector<const QueueList*> m_queuesByFamily;
|
||||
Instance& m_instance;
|
||||
const Vk::PhysicalDevice* m_physicalDevice;
|
||||
EnumMap<QueueType, UInt32> m_defaultQueues;
|
||||
EnumArray<QueueType, UInt32> m_defaultQueues;
|
||||
VkAllocationCallbacks m_allocator;
|
||||
VkDevice m_device;
|
||||
VkResult m_lastErrorCode;
|
||||
|
||||
Reference in New Issue
Block a user