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