summaryrefslogtreecommitdiffstats
path: root/src/World.cpp
diff options
context:
space:
mode:
authorDavid Robillard <d@drobilla.net>2013-01-11 05:40:18 +0000
committerDavid Robillard <d@drobilla.net>2013-01-11 05:40:18 +0000
commitd443ddb053141510311e002c59746a2dd9ba8b16 (patch)
tree6bbe7b6532824117dc9a1ca25d7a09ef3601c2cc /src/World.cpp
parent10e9a3a800a35916872abf9e354be4c554338e4e (diff)
downloadingen-d443ddb053141510311e002c59746a2dd9ba8b16.tar.gz
ingen-d443ddb053141510311e002c59746a2dd9ba8b16.tar.bz2
ingen-d443ddb053141510311e002c59746a2dd9ba8b16.zip
Use range-based for loops where possible.
Mmm, shiny. git-svn-id: http://svn.drobilla.net/lad/trunk/ingen@4919 a436a847-0d15-0410-975c-d299462d15a1
Diffstat (limited to 'src/World.cpp')
-rw-r--r--src/World.cpp16
1 files changed, 7 insertions, 9 deletions
diff --git a/src/World.cpp b/src/World.cpp
index 8b6a58ea..0b56262c 100644
--- a/src/World.cpp
+++ b/src/World.cpp
@@ -110,10 +110,8 @@ public:
{
// Parse default configuration files
std::list<std::string> files = conf.load_default("ingen", "options.ttl");
- for (std::list<std::string>::const_iterator f = files.begin();
- f != files.end();
- ++f) {
- log.info(Raul::fmt("Loaded configuration %1%\n") % *f);
+ for (const auto& f : files) {
+ log.info(Raul::fmt("Loaded configuration %1%\n") % f);
}
// Parse command line options, overriding configuration file values
@@ -164,9 +162,9 @@ public:
// Delete module objects but save pointers to libraries
typedef std::list<Glib::Module*> Libs;
Libs libs;
- for (Modules::iterator i = modules.begin(); i != modules.end(); ++i) {
- libs.push_back(i->second->library);
- delete i->second;
+ for (auto& m : modules) {
+ libs.push_back(m.second->library);
+ delete m.second;
}
delete rdf_world;
@@ -178,8 +176,8 @@ public:
lilv_world_free(lilv_world);
// Close module libraries
- for (Libs::iterator l = libs.begin(); l != libs.end(); ++l) {
- delete *l;
+ for (auto& l : libs) {
+ delete l;
}
}