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:
@@ -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;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user