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

Use ranges for Object Iteration to simplify code

parent bb622d2e
......@@ -71,13 +71,11 @@ void PluginAlignMeshes::initializePlugin() {
void PluginAlignMeshes::alignMeshes() {
for (PluginFunctions::ObjectIterator o_it(PluginFunctions::TARGET_OBJECTS, DATA_TRIANGLE_MESH); o_it
!= PluginFunctions::objectsEnd(); ++o_it) {
for (auto* o_it : PluginFunctions::objects(PluginFunctions::TARGET_OBJECTS, DATA_TRIANGLE_MESH) ) {
if(o_it->dataType() == DATA_TRIANGLE_MESH) {
TriMesh& mesh = * PluginFunctions::triMesh(*o_it);
TriMesh& mesh = * PluginFunctions::triMesh(o_it);
align::moveToCOG( mesh );
align::rotate( mesh );
......@@ -86,7 +84,7 @@ void PluginAlignMeshes::alignMeshes() {
} else if(o_it->dataType() == DATA_POLY_MESH) {
PolyMesh& mesh = * PluginFunctions::polyMesh(*o_it);
PolyMesh& mesh = * PluginFunctions::polyMesh(o_it);
align::moveToCOG( mesh );
align::rotate( 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