From a0ec0d938f5a7fba4d2e2573bc3552ae1888c05b Mon Sep 17 00:00:00 2001 From: Lioncash Date: Thu, 18 Jun 2020 12:00:31 -0400 Subject: [PATCH] GLCommon: Make use of std::array where applicable --- src/Core/OpenGL/GLCommon.cpp | 4 ++-- src/Core/OpenGL/GLCommon.h | 5 +++-- 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/src/Core/OpenGL/GLCommon.cpp b/src/Core/OpenGL/GLCommon.cpp index 9bbed358..02036805 100644 --- a/src/Core/OpenGL/GLCommon.cpp +++ b/src/Core/OpenGL/GLCommon.cpp @@ -1,7 +1,7 @@ #include "GLCommon.h" #include -GLenum gBlendFactor[] = +const std::array gBlendFactor { GL_ZERO, // GX_BL_ZERO GL_ONE, // GX_BL_ONE @@ -14,7 +14,7 @@ GLenum gBlendFactor[] = }; -GLenum gZMode[] = +const std::array gZMode { GL_NEVER, // GX_NEVER GL_LESS, // GX_LESS diff --git a/src/Core/OpenGL/GLCommon.h b/src/Core/OpenGL/GLCommon.h index 58a1f44d..1f957298 100644 --- a/src/Core/OpenGL/GLCommon.h +++ b/src/Core/OpenGL/GLCommon.h @@ -3,6 +3,7 @@ #include #include +#include enum class EBlendFactor { @@ -29,8 +30,8 @@ enum class EPrimitiveType Points = 0xB8 }; -extern GLenum gBlendFactor[]; -extern GLenum gZMode[]; +extern const std::array gBlendFactor; +extern const std::array gZMode; GLenum GXPrimToGLPrim(EPrimitiveType Type); #endif // GLCOMMON_H