diff options
| author | Carl Hetherington <cth@carlh.net> | 2021-11-05 00:43:00 +0100 |
|---|---|---|
| committer | Carl Hetherington <cth@carlh.net> | 2021-11-05 00:43:00 +0100 |
| commit | 5d1496fa502655d334439b4b2658625a2b3c1b70 (patch) | |
| tree | defaa6e2074a4e3fd93dae5c3899c51a12866a65 /src/wx/content_widget.h | |
| parent | d50c23b8ddc05953322d2d0eb6ca5cb8ad88645f (diff) | |
C++11 tidying.
Diffstat (limited to 'src/wx/content_widget.h')
| -rw-r--r-- | src/wx/content_widget.h | 14 |
1 files changed, 7 insertions, 7 deletions
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<std::shared_ptr<Content> > List; + typedef std::vector<std::shared_ptr<Content>> List; /** Set the content that this control is working on (i.e. the selected content) */ void set_content (List content) { - for (typename std::list<boost::signals2::connection>::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; |
