Commit c5759b86 authored by Jan Möbius's avatar Jan Möbius
Browse files

Use ranges for Object Iteration to simplify code

parent 69984498
......@@ -884,7 +884,7 @@ void InfoMeshObjectPlugin::updateData( int _identifier , const UpdateType& _type
// Therefore we need to get the remaining target by iteration.
// If something was deleted, we might see this object here, so make sure, to not take the one with the same id as the deleted one
if ( object && !object->target() ) {
for ( PluginFunctions::ObjectIterator o_it = PluginFunctions::ObjectIterator(PluginFunctions::TARGET_OBJECTS); o_it != PluginFunctions::objectsEnd(); ++o_it ) {
for (auto* o_it : PluginFunctions::objects(PluginFunctions::TARGET_OBJECTS) ) {
if ( !_deleted || ( o_it->id() != _identifier ) ) {
object = *o_it;
break;
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment