17
0
mirror of https://github.com/MaSzyna-EU07/maszyna.git synced 2026-10-17 12:09:19 +02:00

refactor(sonar): use std::ranges algorithms and std::erase(_if) (cpp:S6197)

This commit is contained in:
jerrrrycho
2026-10-10 16:24:06 +02:00
parent 9a674b4944
commit d0a6353449
9 changed files with 25 additions and 38 deletions

View File

@@ -29,12 +29,7 @@ light_array::insert( TDynamicObject const *Owner ) {
void
light_array::remove( TDynamicObject const *Owner ) {
data.erase(
std::remove_if(
data.begin(),
data.end(),
[=]( light_record const &light ){ return light.owner == Owner; } ),
data.end() );
std::erase_if( data, [=]( light_record const &light ){ return light.owner == Owner; } );
}
// updates records in the collection