mirror of
https://github.com/MaSzyna-EU07/maszyna.git
synced 2026-10-17 06:19:19 +02:00
refactor(sonar): make read-only local references and pointers const (cpp:S5350)
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
@@ -87,7 +87,7 @@ void gl::buffer::download(targets target, void *data, int offset, GLsizeiptr siz
|
||||
}
|
||||
else
|
||||
{
|
||||
void *glbuf = glMapBufferRange(glenum_target(target), offset, size, GL_MAP_READ_BIT);
|
||||
void const *glbuf = glMapBufferRange(glenum_target(target), offset, size, GL_MAP_READ_BIT);
|
||||
memcpy(data, glbuf, size);
|
||||
glUnmapBuffer(glenum_target(target));
|
||||
}
|
||||
|
||||
@@ -339,7 +339,7 @@ void gl::program::init()
|
||||
|
||||
for (auto [texturename, textureentry] : texture_conf)
|
||||
{
|
||||
shader::texture_entry &e = textureentry;
|
||||
shader::texture_entry const &e = textureentry;
|
||||
GLuint loc = glGetUniformLocation(*this, texturename.c_str());
|
||||
glUniform1i(loc, static_cast<GLint>(e.id));
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user