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