diff --git a/src/Magnum/Platform/ScreenedApplication.hpp b/src/Magnum/Platform/ScreenedApplication.hpp index b4bb85d77..2b78df0c6 100644 --- a/src/Magnum/Platform/ScreenedApplication.hpp +++ b/src/Magnum/Platform/ScreenedApplication.hpp @@ -80,7 +80,8 @@ template void BasicScreenedApplication::viewport /* Call global event before all other (to resize framebuffer first) */ globalViewportEvent(size); - for(BasicScreen& s: *this) s.viewportEvent(size); + for(BasicScreen* s = screens().first(); s; s = s->nextFartherScreen()) + s->viewportEvent(size); } template void BasicScreenedApplication::drawEvent() { diff --git a/src/Magnum/SceneGraph/Object.hpp b/src/Magnum/SceneGraph/Object.hpp index afe9917b6..5207168bd 100644 --- a/src/Magnum/SceneGraph/Object.hpp +++ b/src/Magnum/SceneGraph/Object.hpp @@ -122,12 +122,12 @@ template void Object::setDirty() { if(flags & Flag::Dirty) return; /* Make all features dirty */ - for(AbstractFeature& feature: this->features()) - feature.markDirty(); + for (auto feature = this->features().first(); feature; feature = feature->nextFeature()) + feature->markDirty(); /* Make all children dirty */ - for(Object& child: children()) - child.setDirty(); + for(auto child = children().first(); child; child = child->nextSibling()) + child->setDirty(); /* Mark object as dirty */ flags |= Flag::Dirty; @@ -388,28 +388,28 @@ template void Object::setCleanInternal(con MatrixType matrix, invertedMatrix; /* Clean all features */ - for(AbstractFeature& feature: this->features()) { + for (auto feature = this->features().first(); feature; feature = feature->nextFeature()) { /* Cached absolute transformation, compute it if it wasn't computed already */ - if(feature.cachedTransformations() & CachedTransformation::Absolute) { + if(feature->cachedTransformations() & CachedTransformation::Absolute) { if(!(cached & CachedTransformation::Absolute)) { cached |= CachedTransformation::Absolute; matrix = Implementation::Transformation::toMatrix(absoluteTransformation); } - feature.clean(matrix); + feature->clean(matrix); } /* Cached inverse absolute transformation, compute it if it wasn't computed already */ - if(feature.cachedTransformations() & CachedTransformation::InvertedAbsolute) { + if(feature->cachedTransformations() & CachedTransformation::InvertedAbsolute) { if(!(cached & CachedTransformation::InvertedAbsolute)) { cached |= CachedTransformation::InvertedAbsolute; invertedMatrix = Implementation::Transformation::toMatrix( Implementation::Transformation::inverted(absoluteTransformation)); } - feature.cleanInverted(invertedMatrix); + feature->cleanInverted(invertedMatrix); } }