mirror of
https://github.com/MaSzyna-EU07/maszyna.git
synced 2026-10-17 06:19:19 +02: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:
@@ -117,24 +117,18 @@ sound_source::deserialize( cParser &Input, sound_type const Legacytype, int cons
|
||||
}
|
||||
}
|
||||
|
||||
if( Legacyparameters & sound_parameters::range ) {
|
||||
if( Input.getTokens( 1, false ) ) {
|
||||
Input >> m_range;
|
||||
}
|
||||
if (Legacyparameters & sound_parameters::range && Input.getTokens( 1, false )) {
|
||||
Input >> m_range;
|
||||
}
|
||||
if( Legacyparameters & sound_parameters::amplitude ) {
|
||||
if( Input.getTokens( 2, false ) ) {
|
||||
Input
|
||||
>> m_amplitudefactor
|
||||
>> m_amplitudeoffset;
|
||||
}
|
||||
if (Legacyparameters & sound_parameters::amplitude && Input.getTokens( 2, false )) {
|
||||
Input
|
||||
>> m_amplitudefactor
|
||||
>> m_amplitudeoffset;
|
||||
}
|
||||
if( Legacyparameters & sound_parameters::frequency ) {
|
||||
if( Input.getTokens( 2, false ) ) {
|
||||
Input
|
||||
>> m_frequencyfactor
|
||||
>> m_frequencyoffset;
|
||||
}
|
||||
if (Legacyparameters & sound_parameters::frequency && Input.getTokens( 2, false )) {
|
||||
Input
|
||||
>> m_frequencyfactor
|
||||
>> m_frequencyoffset;
|
||||
}
|
||||
}
|
||||
// restore parser behaviour
|
||||
|
||||
Reference in New Issue
Block a user