# HG changeset patch # User Benjamin Golinvaux # Date 1560623868 -7200 # Node ID df6c524024848af6d7b3686a2500c9e5f1445c63 # Parent 17423d072a95b5351a5ed807bab39419efdc576a# Parent cdba0dbb468290c6994d0b3c525216e6c689c27e merge diff -r 17423d072a95 -r df6c52402484 Applications/Generic/GuiAdapter.cpp --- a/Applications/Generic/GuiAdapter.cpp Sat Jun 15 20:37:12 2019 +0200 +++ b/Applications/Generic/GuiAdapter.cpp Sat Jun 15 20:37:48 2019 +0200 @@ -479,19 +479,19 @@ void GuiAdapter::OnAnimationFrame() { - for (const auto& handler : animationFrameHandlers_) + for (size_t i = 0; i < animationFrameHandlers_.size(); i++) { // TODO: fix time - (*(handler.first))(0,handler.second); + (*(animationFrameHandlers_[i].first))(0, animationFrameHandlers_[i].second); } } void GuiAdapter::OnResize() { - for (const auto& handler : resizeHandlers_) + for (size_t i = 0; i < resizeHandlers_.size(); i++) { // TODO: fix time - (*(handler.first))(0, handler.second); + (*(resizeHandlers_[i].first))(0, resizeHandlers_[i].second); } } diff -r 17423d072a95 -r df6c52402484 Applications/Generic/GuiAdapter.h --- a/Applications/Generic/GuiAdapter.h Sat Jun 15 20:37:12 2019 +0200 +++ b/Applications/Generic/GuiAdapter.h Sat Jun 15 20:37:48 2019 +0200 @@ -45,6 +45,7 @@ # include "../../Framework/Messages/LockingEmitter.h" #endif +#include #include #include @@ -309,13 +310,13 @@ */ void ViewportsUpdateSize(); - std::vector> widgets_; + std::vector > widgets_; template void VisitWidgets(F func) { - for (auto w : widgets_) + for (size_t i = 0; i < widgets_.size(); i++) { - boost::shared_ptr widget = w.lock(); + boost::shared_ptr widget = widgets_[i].lock(); func(widget); } }