X-Git-Url: https://git.carlh.net/gitweb/?a=blobdiff_plain;f=src%2Fwx%2Fcontent_widget.h;h=782b339a784ad0fd40bf8a4d2e6ac38c02fac975;hb=5d1496fa502655d334439b4b2658625a2b3c1b70;hp=34755e4b5a7e1707b710f45487bc9cdf4934dfd3;hpb=8963f0007af1a312017b9627c18b82ec2a577591;p=dcpomatic.git diff --git a/src/wx/content_widget.h b/src/wx/content_widget.h index 34755e4b5..782b339a7 100644 --- a/src/wx/content_widget.h +++ b/src/wx/content_widget.h @@ -92,13 +92,13 @@ public: return _wrapped; } - typedef std::vector > List; + typedef std::vector> List; /** Set the content that this control is working on (i.e. the selected content) */ void set_content (List content) { - for (typename std::list::iterator i = _connections.begin(); i != _connections.end(); ++i) { - i->disconnect (); + for (auto& i: _connections) { + i.disconnect (); } _connections.clear (); @@ -109,11 +109,11 @@ public: update_from_model (); - for (typename List::iterator i = _content.begin(); i != _content.end(); ++i) { + for (auto i: _content) { #if BOOST_VERSION >= 106100 - _connections.push_back ((*i)->Change.connect (boost::bind (&ContentWidget::model_changed, this, boost::placeholders::_1, boost::placeholders::_3))); + _connections.push_back (i->Change.connect(boost::bind(&ContentWidget::model_changed, this, boost::placeholders::_1, boost::placeholders::_3))); #else - _connections.push_back ((*i)->Change.connect (boost::bind (&ContentWidget::model_changed, this, _1, _3))); + _connections.push_back (i->Change.connect(boost::bind(&ContentWidget::model_changed, this, _1, _3))); #endif } } @@ -135,7 +135,7 @@ public: return; } - typename List::iterator i = _content.begin (); + auto i = _content.begin (); U const v = boost::bind (_model_getter, _part(_content.front().get()).get())(); while (i != _content.end() && boost::bind (_model_getter, _part(i->get()).get())() == v) { ++i;