mirror of
https://github.com/MaSzyna-EU07/maszyna.git
synced 2026-10-17 17:59:19 +02:00
refactor(sonar): scope single-use variables in if init-statements (cpp:S6004)
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
@@ -154,8 +154,7 @@ std::pair<GLuint, std::string> gl::shader::process_source(const std::string &fil
|
||||
// the driver advertises support (see desktop comment above).
|
||||
// (Glad config doesn't generate GLAD_GL_EXT_gpu_shader5 -- query
|
||||
// the live extension string the same way.)
|
||||
static bool const have_gpu_shader5 = has_gl_extension("GL_EXT_gpu_shader5");
|
||||
if (have_gpu_shader5)
|
||||
if (static bool const have_gpu_shader5 = has_gl_extension("GL_EXT_gpu_shader5"); have_gpu_shader5)
|
||||
str += "#extension GL_EXT_gpu_shader5 : enable\n";
|
||||
if (type == GL_GEOMETRY_SHADER)
|
||||
str += "#extension GL_EXT_geometry_shader : require\n";
|
||||
|
||||
Reference in New Issue
Block a user