17
0
mirror of https://github.com/MaSzyna-EU07/maszyna.git synced 2026-11-02 09:19:12 +01: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; return adapter_type != TCouplerType::NoCoupler;
} }
inline TCouplerType const type() const inline TCouplerType type() const
{ {
return adapter_type == TCouplerType::NoCoupler ? CouplerType : adapter_type; 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 // returns location of the sound source in simulation region space
glm::dvec3 const glm::dvec3
sound_source::location() const { sound_source::location() const {
if( m_owner == nullptr ) { if( m_owner == nullptr ) {
@@ -920,7 +920,7 @@ sound_source::range( float const Range ) {
} }
// returns defined range of the sound // returns defined range of the sound
float const float
sound_source::range() const { sound_source::range() const {
return m_range; return m_range;

View File

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

View File

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

View File

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

View File

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

View File

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