mirror of
https://github.com/MaSzyna-EU07/maszyna.git
synced 2026-11-03 17:50:21 +01:00
refactor(sonar): avoid side effects inside typeid operands (cpp:S5279)
This commit is contained in:
@@ -767,7 +767,9 @@ std::shared_ptr<dictionary_source> TTrain::GetTrainState(dictionary_source const
|
||||
bool const bEP = mvControlled->LocHandle->GetCP() > 0.2 || fEIMParams[0][5] > 0.01;
|
||||
dict->insert("dir_brake", bEP);
|
||||
bool bPN{false};
|
||||
if (typeid(*mvOccupied->Hamulec) == typeid(TLSt) || typeid(*mvOccupied->Hamulec) == typeid(TEStED))
|
||||
auto const &brakevalve{*mvOccupied->Hamulec};
|
||||
auto const &brakevalvetype{typeid(brakevalve)};
|
||||
if (brakevalvetype == typeid(TLSt) || brakevalvetype == typeid(TEStED))
|
||||
{
|
||||
|
||||
TBrake *temp_ham = mvOccupied->Hamulec.get();
|
||||
|
||||
Reference in New Issue
Block a user