Mercurial > hg > orthanc-stone
comparison Applications/Generic/GuiAdapter.h @ 845:cdba0dbb4682
removed some c++11 for older compilers
author | Sebastien Jodogne <s.jodogne@gmail.com> |
---|---|
date | Fri, 14 Jun 2019 14:46:16 +0200 |
parents | 67f9c27214c5 |
children | df0c73ee7afa |
comparison
equal
deleted
inserted
replaced
844:84cd55245e2d | 845:cdba0dbb4682 |
---|---|
43 | 43 |
44 #if ORTHANC_ENABLE_THREADS != 1 | 44 #if ORTHANC_ENABLE_THREADS != 1 |
45 # include "../../Framework/Messages/LockingEmitter.h" | 45 # include "../../Framework/Messages/LockingEmitter.h" |
46 #endif | 46 #endif |
47 | 47 |
48 #include <vector> | |
48 #include <boost/shared_ptr.hpp> | 49 #include <boost/shared_ptr.hpp> |
49 #include <boost/weak_ptr.hpp> | 50 #include <boost/weak_ptr.hpp> |
50 | 51 |
51 namespace OrthancStone | 52 namespace OrthancStone |
52 { | 53 { |
307 This executes all the registered headers if needed (in wasm, the browser | 308 This executes all the registered headers if needed (in wasm, the browser |
308 deals with this) | 309 deals with this) |
309 */ | 310 */ |
310 void ViewportsUpdateSize(); | 311 void ViewportsUpdateSize(); |
311 | 312 |
312 std::vector<boost::weak_ptr<IGuiAdapterWidget>> widgets_; | 313 std::vector<boost::weak_ptr<IGuiAdapterWidget> > widgets_; |
313 | 314 |
314 template<typename F> void VisitWidgets(F func) | 315 template<typename F> void VisitWidgets(F func) |
315 { | 316 { |
316 for (auto w : widgets_) | 317 for (size_t i = 0; i < widgets_.size(); i++) |
317 { | 318 { |
318 boost::shared_ptr<IGuiAdapterWidget> widget = w.lock(); | 319 boost::shared_ptr<IGuiAdapterWidget> widget = widgets_[i].lock(); |
319 func(widget); | 320 func(widget); |
320 } | 321 } |
321 } | 322 } |
322 }; | 323 }; |
323 } | 324 } |