17
0
mirror of https://github.com/MaSzyna-EU07/maszyna.git synced 2026-10-18 00:59:18 +02:00

refactor(sonar): use std::array for local fixed-size arrays (cpp:S5945)

Arrays that are class members or part of headers are left unchanged.
This commit is contained in:
jerrrrycho
2026-10-10 17:44:14 +02:00
parent 7a27af5a47
commit a322472632
12 changed files with 74 additions and 74 deletions

View File

@@ -90,17 +90,17 @@ void gl::framebuffer::blit(framebuffer const *src, framebuffer const *dst, int s
int attachment_n = attachment - GL_COLOR_ATTACHMENT0;
{
GLenum outputs[8] = { GL_NONE };
std::array<GLenum, 8> outputs{ GL_NONE };
outputs[attachment_n] = src != nullptr ? attachment : GL_BACK_LEFT;
glReadBuffer(attachment);
}
{
GLenum outputs[8] = { GL_NONE };
std::array<GLenum, 8> outputs{ GL_NONE };
outputs[attachment_n] = dst != nullptr ? attachment : GL_BACK_LEFT;
glDrawBuffers(attachment_n + 1, outputs);
glDrawBuffers(attachment_n + 1, outputs.data());
}
}