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

refactor(sonar): drop top-level const from by-value return types (cpp:S5951)

This commit is contained in:
jerrrrycho
2026-10-10 16:29:47 +02:00
parent f82b12b2c6
commit 3c80ea20c7
7 changed files with 10 additions and 10 deletions

View File

@@ -1240,7 +1240,7 @@ struct TCoupling
{
return adapter_type != TCouplerType::NoCoupler;
}
inline TCouplerType const type() const
inline TCouplerType type() const
{
return adapter_type == TCouplerType::NoCoupler ? CouplerType : adapter_type;
}

View File

@@ -898,7 +898,7 @@ sound_source::has_bookends() const {
}
// returns location of the sound source in simulation region space
glm::dvec3 const
glm::dvec3
sound_source::location() const {
if( m_owner == nullptr ) {
@@ -920,7 +920,7 @@ sound_source::range( float const Range ) {
}
// returns defined range of the sound
float const
float
sound_source::range() const {
return m_range;

View File

@@ -137,12 +137,12 @@ public:
bool
has_bookends() const;
// returns location of the sound source in simulation region space
glm::dvec3 const
glm::dvec3
location() const;
// returns defined range of the sound
void
range( float const Range );
float const
float
range() const;
// members

View File

@@ -15,12 +15,12 @@ namespace gl
return id;
}
inline operator GLuint* const()
inline operator GLuint*()
{
return &id;
}
inline operator const GLuint* const() const
inline operator const GLuint*() const
{
return &id;
}

View File

@@ -56,7 +56,7 @@ public:
void
poll();
inline
user_command const
user_command
command() const {
return m_command; }
bindingsetup_sequence&

View File

@@ -110,7 +110,7 @@ private:
return Value == 0 ? 1 : 0; }
// element access
inline
auto element( element_handle const Element ) const -> basic_element const {
auto element( element_handle const Element ) const -> basic_element {
return m_elements[ Element - 1 ]; }
inline
auto element( element_handle const Element ) -> basic_element & {

View File

@@ -929,7 +929,7 @@ private:
// plays provided sound from position of the radio
bool radio_message_played;
void radio_message( sound_source *Message, int const Channel );
inline auto const RadioChannel() const { return Dynamic()->Mechanik ? Dynamic()->Mechanik->iRadioChannel : 1; }
inline auto RadioChannel() const { return Dynamic()->Mechanik ? Dynamic()->Mechanik->iRadioChannel : 1; }
inline auto &RadioChannel() { return Dynamic()->Mechanik->iRadioChannel; }
inline TDynamicObject *Dynamic() { return DynamicObject; };
inline TDynamicObject const *Dynamic() const { return DynamicObject; };