[goocanvasmm] C++11: Use of range-based for loop.
- From: Murray Cumming <murrayc src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [goocanvasmm] C++11: Use of range-based for loop.
- Date: Wed, 29 Jul 2015 12:36:19 +0000 (UTC)
commit dcb3fd93562a69667a57c8d20a9c03a93541cbce
Author: Murray Cumming <murrayc murrayc com>
Date: Wed Jul 29 14:06:57 2015 +0200
C++11: Use of range-based for loop.
examples/demo/window.cc | 4 +---
1 files changed, 1 insertions(+), 3 deletions(-)
---
diff --git a/examples/demo/window.cc b/examples/demo/window.cc
index db113f6..348f891 100644
--- a/examples/demo/window.cc
+++ b/examples/demo/window.cc
@@ -28,10 +28,8 @@ DemoWindow::DemoWindow()
auto nb = Gtk::manage(new Gtk::Notebook());
- std::vector< Page* >::iterator iter ;
- for(iter = _pages.begin(); iter != _pages.end(); iter++)
+ for(const auto& p : _pages)
{
- auto p = *iter ;
nb->append_page(*(p->getWidget()), p->getName());
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]