17
0
mirror of https://github.com/MaSzyna-EU07/maszyna.git synced 2026-11-06 11:38:38 +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

@@ -355,14 +355,14 @@ void TNESt3::CheckState(double const BCP, double & /*dV1*/) // glowny przyrzad r
if( ( BrakeStatus & b_hld ) == 0 )
SoundFlag |= sf_CylU;
if (VVP + 0.10 < CVP && BCP < 0.25) // poczatek hamowania
if (false == Przys_blok)
{
ValveRes->CreatePress(0.1 * VVP);
SoundFlag |= sf_Acc;
ValveRes->Act();
Przys_blok = true;
}
// poczatek hamowania
if (VVP + 0.10 < CVP && BCP < 0.25 && false == Przys_blok)
{
ValveRes->CreatePress(0.1 * VVP);
SoundFlag |= sf_Acc;
ValveRes->Act();
Przys_blok = true;
}
if (BCP > 0.5)
Zamykajacy = true;