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

Use ranges for Object Iteration to simplify code

parent f283da85
......@@ -126,7 +126,7 @@ void HoleFillerPlugin::slotFillSelection(){
int counter = 0;
//iterate over all objects with holes that should be filled
for ( PluginFunctions::ObjectIterator o_it(PluginFunctions::ALL_OBJECTS) ; o_it != PluginFunctions::objectsEnd(); ++o_it) {
for (auto* o_it : PluginFunctions::objects(PluginFunctions::ALL_OBJECTS) ) {
// TYPE is TRIMESH
if ( o_it->dataType( DATA_TRIANGLE_MESH ) ) {
......@@ -184,7 +184,7 @@ void HoleFillerPlugin::slotItemSelectionChanged() {
getSelectedHoles(holes,objects);
//iterate over all objects with holes that should be displayed
for ( PluginFunctions::ObjectIterator o_it(PluginFunctions::ALL_OBJECTS) ; o_it != PluginFunctions::objectsEnd(); ++o_it) {
for (auto* o_it : PluginFunctions::objects(PluginFunctions::ALL_OBJECTS) ) {
// TYPE is TRIMESH
if ( o_it->dataType( DATA_TRIANGLE_MESH ) ) {
......@@ -327,7 +327,7 @@ void HoleFillerPlugin::slotCellDoubleClicked(int _row , int /*_col*/) {
/// detect holes on all objects
void HoleFillerPlugin::detectButton( )
{
for ( PluginFunctions::ObjectIterator o_it(PluginFunctions::ALL_OBJECTS) ; o_it != PluginFunctions::objectsEnd(); ++o_it) {
for (auto* o_it : PluginFunctions::objects(PluginFunctions::ALL_OBJECTS) ) {
//case TRIMESH
if ( o_it->dataType( DATA_TRIANGLE_MESH ) ) {
......@@ -422,7 +422,7 @@ void HoleFillerPlugin::update_menu() {
int count = 0;
//iterate over all objects
for ( PluginFunctions::ObjectIterator o_it(PluginFunctions::ALL_OBJECTS) ; o_it != PluginFunctions::objectsEnd(); ++o_it) {
for (auto* o_it : PluginFunctions::objects(PluginFunctions::ALL_OBJECTS) ) {
// DATATYPE is TRIMESH
if ( o_it->dataType( DATA_TRIANGLE_MESH ) ) {
......
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