# HG changeset patch # User Sebastien Jodogne # Date 1560516376 -7200 # Node ID cdba0dbb468290c6994d0b3c525216e6c689c27e # Parent 84cd55245e2d287b8cdb800a7d053e0e02de2b80 removed some c++11 for older compilers diff -r 84cd55245e2d -r cdba0dbb4682 Applications/Generic/GuiAdapter.cpp --- a/Applications/Generic/GuiAdapter.cpp Fri Jun 14 12:16:38 2019 +0200 +++ b/Applications/Generic/GuiAdapter.cpp Fri Jun 14 14:46:16 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 84cd55245e2d -r cdba0dbb4682 Applications/Generic/GuiAdapter.h --- a/Applications/Generic/GuiAdapter.h Fri Jun 14 12:16:38 2019 +0200 +++ b/Applications/Generic/GuiAdapter.h Fri Jun 14 14:46:16 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); } }