diff options
author | Murray Cumming <murrayc@murrayc.com> | 2013-06-26 10:46:22 +0200 |
---|---|---|
committer | Murray Cumming <murrayc@murrayc.com> | 2015-07-09 23:26:12 +0200 |
commit | 2cad48817914213f41fd7b85cac0f650b0f9d7ce (patch) | |
tree | 8b721ddd53e7d5528e9c38c418b6abc6b6a0f1c3 /examples/dbus | |
parent | 1b23397544bd031331b3110be1b790659bdceb24 (diff) | |
download | glibmm-2cad48817914213f41fd7b85cac0f650b0f9d7ce.tar.gz |
C++11: Use range-based for loops.
Diffstat (limited to 'examples/dbus')
-rw-r--r-- | examples/dbus/client_bus_listnames.cc | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/examples/dbus/client_bus_listnames.cc b/examples/dbus/client_bus_listnames.cc index b46fdcf8..0a49d739 100644 --- a/examples/dbus/client_bus_listnames.cc +++ b/examples/dbus/client_bus_listnames.cc @@ -60,8 +60,8 @@ void on_dbus_proxy_available(Glib::RefPtr<Gio::AsyncResult>& result) std::cout << "The names on the message bus are:" << std::endl; - for(unsigned i = 0; i < names.size(); i++) - std::cout << names[i] << "." << std::endl; + for(const auto& i : names) + std::cout << i << "." << std::endl; } catch(const Glib::Error& error) { |