diff options
author | Dan Goodliffe <dan@randomdan.homeip.net> | 2022-08-21 13:42:48 +0100 |
---|---|---|
committer | Dan Goodliffe <dan@randomdan.homeip.net> | 2022-08-21 13:42:48 +0100 |
commit | 5694a281e3efc13a62dc43ced9c7459724d01b23 (patch) | |
tree | 4fcaba562171e6e661e2050895782501bb71f5d8 | |
parent | Suppress redundantPointerOp cppcheck (diff) | |
download | ilt-5694a281e3efc13a62dc43ced9c7459724d01b23.tar.bz2 ilt-5694a281e3efc13a62dc43ced9c7459724d01b23.tar.xz ilt-5694a281e3efc13a62dc43ced9c7459724d01b23.zip |
Reduce variable scope
-rw-r--r-- | gfx/gl/glSource.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/gfx/gl/glSource.cpp b/gfx/gl/glSource.cpp index 49773d0..962d096 100644 --- a/gfx/gl/glSource.cpp +++ b/gfx/gl/glSource.cpp @@ -18,7 +18,6 @@ void GLsource::CheckShaderError(GLuint shader, GLuint flag, bool isProgram, std::string_view errorMessage) { GLint success = 0; - std::array<GLchar, 1024> error {}; if (isProgram) { glGetProgramiv(shader, flag, &success); @@ -28,6 +27,7 @@ GLsource::CheckShaderError(GLuint shader, GLuint flag, bool isProgram, std::stri } if (success == GL_FALSE) { + std::array<GLchar, 1024> error {}; if (isProgram) { glGetProgramInfoLog(shader, error.size(), nullptr, error.data()); } |