17
0
mirror of https://github.com/MaSzyna-EU07/maszyna.git synced 2026-11-10 13:43:14 +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

@@ -2136,7 +2136,8 @@ catenary_scene_update( std::size_t const Index, catenary::suspension const &Data
mark_changed( suspension.file );
if( false == before.empty() && before != Data.umbrella ) {
drop_parts( suspension );
for( auto const index : umbrella_members( before ) ) { reassemble( index ); break; }
// parasol składa jego pierwsze podwieszenie
if( auto const members { umbrella_members( before ) }; false == members.empty() ) { reassemble( members.front() ); }
}
reassemble( Index );
follow_chains( Index );
@@ -2153,7 +2154,8 @@ catenary_scene_remove( std::size_t const Index ) {
suspension.removed = true;
mark_changed( suspension.file );
if( false == umbrella.empty() ) {
for( auto const index : umbrella_members( umbrella ) ) { reassemble( index ); break; }
// parasol składa jego pierwsze podwieszenie
if( auto const members { umbrella_members( umbrella ) }; false == members.empty() ) { reassemble( members.front() ); }
}
// z łańcuchów wypada; łańcuch z jednym podwieszeniem przestaje istnieć
if( false == suspension.data.name.empty() ) {