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

refactor(sonar): declare non-mutating member functions const (cpp:S5817)

Virtual functions are left untouched so overrides keep matching.
This commit is contained in:
jerrrrycho
2026-10-10 15:26:48 +02:00
parent 01d2b9bf82
commit 8042953b95
82 changed files with 221 additions and 221 deletions

View File

@@ -16,7 +16,7 @@ void opengl33_light::apply_intensity(float const Factor) {
factor = Factor;
}
void opengl33_light::apply_angle() {}
void opengl33_light::apply_angle() const {}
//---------------------------------------------------------------------------

View File

@@ -18,7 +18,7 @@ struct opengl33_light : public basic_light {
float factor;
void apply_intensity(float const Factor = 1.0f);
void apply_angle();
void apply_angle() const;
opengl33_light &operator=(basic_light const &Right) {
basic_light::operator=(Right);

View File

@@ -194,7 +194,7 @@ opengl_vbogeometrybank::setup_buffer() {
}
void
opengl_vbogeometrybank::bind_buffer() {
opengl_vbogeometrybank::bind_buffer() const {
::glBindBuffer( GL_ELEMENT_ARRAY_BUFFER, m_indexbuffer );
::glBindBuffer( GL_ARRAY_BUFFER, m_vertexbuffer );

View File

@@ -58,7 +58,7 @@ private:
void
setup_buffer();
void
bind_buffer();
bind_buffer() const;
void
delete_buffer();
static

View File

@@ -56,7 +56,7 @@ smoke_source::particle_emitter::deserialize( cParser &Input ) {
}
void
smoke_source::particle_emitter::initialize( smoke_particle &Particle ) {
smoke_source::particle_emitter::initialize( smoke_particle &Particle ) const {
auto const polarangle { glm::radians( LocalRandom( inclination[ value_limit::min ], inclination[ value_limit::max ] ) ) }; // theta
auto const azimuthalangle { glm::radians( LocalRandom( -180, 180 ) ) }; // phi

View File

@@ -122,7 +122,7 @@ private:
glm::vec3 color { 16.f / 255.f };
void deserialize( cParser &Input );
void initialize( smoke_particle &Particle );
void initialize( smoke_particle &Particle ) const;
};
using bounding_box = glm::dvec3[ 2 ]; // bounding box of owned particles