17
0
mirror of https://github.com/MaSzyna-EU07/maszyna.git synced 2026-10-29 23:17:30 +01:00

refactor(sonar): merge collapsible nested if statements (cpp:S1066)

Comments that preceded the inner if are kept above the merged statement.
This commit is contained in:
jerrrrycho
2026-10-10 15:39:11 +02:00
parent 8042953b95
commit 0d886e65ec
17 changed files with 616 additions and 882 deletions

View File

@@ -290,11 +290,9 @@ TGauge::Load_mapping( cParser &Input, TGauge::scratch_data &Scratchpad ) {
bool
TGauge::UpdateValue( float fNewDesired, std::optional<sound_source> &Fallbacksound ) {
if( false == UpdateValue( fNewDesired ) ) {
if( Fallbacksound ) {
Fallbacksound->play( m_soundtype );
return true;
}
if (false == UpdateValue( fNewDesired ) && Fallbacksound) {
Fallbacksound->play( m_soundtype );
return true;
}
return false;
}