18
0
mirror of https://github.com/MaSzyna-EU07/maszyna.git synced 2026-11-24 22:29:12 +01:00

refactor(sonar): avoid side effects inside typeid operands (cpp:S5279)

This commit is contained in:
jerrrrycho
2026-10-10 16:26:40 +02:00
parent a510996dc7
commit f82b12b2c6
3 changed files with 9 additions and 3 deletions

View File

@@ -319,7 +319,9 @@ void TNESt3::Init( double const PP, double const HPP, double const LPP, double c
Zamykajacy = false;
if ( typeid(*FM) == typeid(TDisk1) || typeid(*FM) == typeid(TDisk2) ) // jesli zeliwo to schodz
auto const &frictionmaterial { *FM };
auto const &frictionmaterialtype { typeid( frictionmaterial ) };
if ( frictionmaterialtype == typeid(TDisk1) || frictionmaterialtype == typeid(TDisk2) ) // jesli zeliwo to schodz
RapidStaly = true;
else
RapidStaly = false;