Commit 725f03e6 authored by Jan Möbius's avatar Jan Möbius

Use ranges for Object Iteration to simplify code

parent 51eaa82b
......@@ -162,7 +162,7 @@ void ColorPlugin::setDefaultColor() {
// =============================================================================
// Apply to 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) ) {
MaterialNode* mat = o_it->materialNode();
mat->set_base_color( baseColorDefault_ );
mat->set_ambient_color(ambient_color);
......@@ -208,7 +208,7 @@ void ColorPlugin::setPresentationColor() {
// =============================================================================
// Apply to 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) ) {
MaterialNode* mat = o_it->materialNode();
mat->set_base_color( baseColorPresentation_ );
mat->set_ambient_color(ambient_color);
......@@ -254,7 +254,7 @@ void ColorPlugin::setPaperColor() {
// =============================================================================
// Apply to 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) ) {
MaterialNode* mat = o_it->materialNode();
mat->set_base_color( baseColorPaper_ );
mat->set_ambient_color(ambient_color);
......
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