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:
@@ -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 {}
|
||||
|
||||
|
||||
//---------------------------------------------------------------------------
|
||||
|
||||
@@ -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);
|
||||
|
||||
@@ -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 );
|
||||
|
||||
@@ -58,7 +58,7 @@ private:
|
||||
void
|
||||
setup_buffer();
|
||||
void
|
||||
bind_buffer();
|
||||
bind_buffer() const;
|
||||
void
|
||||
delete_buffer();
|
||||
static
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user