17
0
mirror of https://github.com/MaSzyna-EU07/maszyna.git synced 2026-10-31 04:12:20 +01:00

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

Comments that preceded the inner if are kept above the merged statement.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
jerrrrycho
2026-10-10 15:39:11 +02:00
parent 3198cabc78
commit f8104bd0dd
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;
}