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

refactor(sonar): initialise members in initialiser lists or declarations (cpp:S3230)

This commit is contained in:
jerrrrycho
2026-10-10 17:03:17 +02:00
parent c2449db91d
commit 29e8a1befc
11 changed files with 35 additions and 92 deletions

View File

@@ -303,9 +303,8 @@ void gl::shader::log_error(const std::string &str) const
ErrorLog("bad shader: " + name + ": " + str, logtype::shader);
}
gl::shader::shader(const std::string &filename)
gl::shader::shader(const std::string &filename) : name(filename)
{
name = filename;
auto [shadertype, shadersource] = process_source(filename, "shaders/");

View File

@@ -1,10 +1,9 @@
#include "stdafx.h"
#include "ubo.h"
gl::ubo::ubo(size_t size, int idx, GLenum hint)
gl::ubo::ubo(size_t size, int idx, GLenum hint) : index(idx)
{
allocate(buffer::UNIFORM_BUFFER, size, hint);
index = idx;
bind_uniform();
}