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

Use ranges for Object Iteration to simplify code

parent a06630e6
...@@ -189,7 +189,7 @@ void HoleFillerPlugin::slotItemSelectionChanged() { ...@@ -189,7 +189,7 @@ void HoleFillerPlugin::slotItemSelectionChanged() {
// TYPE is TRIMESH // TYPE is TRIMESH
if ( o_it->dataType( DATA_TRIANGLE_MESH ) ) { if ( o_it->dataType( DATA_TRIANGLE_MESH ) ) {
TriMeshObject* object = PluginFunctions::triMeshObject(*o_it); TriMeshObject* object = PluginFunctions::triMeshObject(o_it);
TriMesh* mesh = PluginFunctions::triMesh(o_it); TriMesh* mesh = PluginFunctions::triMesh(o_it);
//get perObjectData //get perObjectData
...@@ -230,7 +230,7 @@ void HoleFillerPlugin::slotItemSelectionChanged() { ...@@ -230,7 +230,7 @@ void HoleFillerPlugin::slotItemSelectionChanged() {
// DATATYPE is POLYMESH // DATATYPE is POLYMESH
else if ( o_it->dataType( DATA_POLY_MESH ) ) { else if ( o_it->dataType( DATA_POLY_MESH ) ) {
PolyMeshObject* object = PluginFunctions::polyMeshObject(*o_it); PolyMeshObject* object = PluginFunctions::polyMeshObject(o_it);
PolyMesh* mesh = PluginFunctions::polyMesh(o_it); PolyMesh* mesh = PluginFunctions::polyMesh(o_it);
//get perObjectData //get perObjectData
...@@ -335,7 +335,7 @@ void HoleFillerPlugin::detectButton( ) ...@@ -335,7 +335,7 @@ void HoleFillerPlugin::detectButton( )
HoleInfo< TriMesh >* holeInfo = dynamic_cast< HoleInfo< TriMesh >* > ( o_it->objectData(HOLEINFO) ); HoleInfo< TriMesh >* holeInfo = dynamic_cast< HoleInfo< TriMesh >* > ( o_it->objectData(HOLEINFO) );
if ( holeInfo == 0 ){ if ( holeInfo == 0 ){
TriMesh* mesh = PluginFunctions::triMesh(*o_it); TriMesh* mesh = PluginFunctions::triMesh(o_it);
holeInfo = new HoleInfo< TriMesh >( mesh ); holeInfo = new HoleInfo< TriMesh >( mesh );
o_it->setObjectData(HOLEINFO, holeInfo); o_it->setObjectData(HOLEINFO, holeInfo);
} }
...@@ -349,7 +349,7 @@ void HoleFillerPlugin::detectButton( ) ...@@ -349,7 +349,7 @@ void HoleFillerPlugin::detectButton( )
HoleInfo< PolyMesh >* holeInfo = dynamic_cast< HoleInfo< PolyMesh >* > ( o_it->objectData(HOLEINFO) ); HoleInfo< PolyMesh >* holeInfo = dynamic_cast< HoleInfo< PolyMesh >* > ( o_it->objectData(HOLEINFO) );
if (holeInfo == 0){ if (holeInfo == 0){
PolyMesh* mesh = PluginFunctions::polyMesh(*o_it); PolyMesh* mesh = PluginFunctions::polyMesh(o_it);
holeInfo = new HoleInfo< PolyMesh >( mesh ); holeInfo = new HoleInfo< PolyMesh >( mesh );
o_it->setObjectData(HOLEINFO, holeInfo); o_it->setObjectData(HOLEINFO, holeInfo);
} }
......
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