From 60aa83c683b71badfe4c76c1c18dec1b90c39965 Mon Sep 17 00:00:00 2001 From: Dan Goodliffe Date: Mon, 26 Jan 2026 20:20:58 +0000 Subject: Fix warnings and minor tidy for GL lookups --- gfx/gl/shader.cpp | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) (limited to 'gfx') diff --git a/gfx/gl/shader.cpp b/gfx/gl/shader.cpp index 21edadb..cc6473e 100644 --- a/gfx/gl/shader.cpp +++ b/gfx/gl/shader.cpp @@ -8,18 +8,18 @@ namespace { auto - getInt(GLenum e) + getInt(GLenum pname) { - GLint i {}; - glGetIntegerv(e, &i); - return std::to_string(i); + GLint data {}; + glGetIntegerv(pname, &data); + return std::to_string(data); } using LookUpFunction = std::string (*)(GLenum); - constexpr std::array, 2> LOOKUPS {{ + constexpr auto LOOKUPS = std::to_array>({ {"GL_MAX_GEOMETRY_OUTPUT_VERTICES", GL_MAX_GEOMETRY_OUTPUT_VERTICES, getInt}, {"GL_MAX_GEOMETRY_TOTAL_OUTPUT_COMPONENTS", GL_MAX_GEOMETRY_TOTAL_OUTPUT_COMPONENTS, getInt}, - }}; + }); struct ShaderCompileError : public MsgException { explicit ShaderCompileError(GLuint shader, Shader::Source src) : -- cgit v1.2.3