17
0
mirror of https://github.com/MaSzyna-EU07/maszyna.git synced 2026-11-09 05:54:43 +01:00

fix: the bugs and vulnerabilities SonarCloud reports on PR #216

This commit is contained in:
2026-11-07 22:11:08 +01:00
parent 8e85def98f
commit 7667e5b2ec
65 changed files with 910 additions and 121 deletions

View File

@@ -90,8 +90,11 @@ y_at( TTraction const &Traction, int const End ) {
auto const neighbourend { Traction.iNext[ End ] };
if( neighbour->hvNext[ neighbourend ] != &Traction ) { return false; }
if( std::abs( y_length( *neighbour ) - ylength ) > 0.01 ) { return false; }
auto const &type { definition( Traction )->type };
auto const &neighbourtype { definition( *neighbour )->type };
auto const *own { definition( Traction ) };
auto const *neighbourdefinition { definition( *neighbour ) };
if( own == nullptr || neighbourdefinition == nullptr ) { return false; }
auto const &type { own->type };
auto const &neighbourtype { neighbourdefinition->type };
if( type.y_tension != neighbourtype.y_tension
|| type.y_mass != neighbourtype.y_mass
|| type.messenger_count != neighbourtype.messenger_count ) {