summaryrefslogtreecommitdiffstats
path: root/src/server/ingen_lv2.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/server/ingen_lv2.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/server/ingen_lv2.cpp')
-rw-r--r--src/server/ingen_lv2.cpp20
1 files changed, 10 insertions, 10 deletions
diff --git a/src/server/ingen_lv2.cpp b/src/server/ingen_lv2.cpp
index f8f4b7c3..e866ea0e 100644
--- a/src/server/ingen_lv2.cpp
+++ b/src/server/ingen_lv2.cpp
@@ -183,8 +183,8 @@ public:
// Notify buffer is a Chunk with size set to the available space
_notify_capacity = ((LV2_Atom_Sequence*)_ports[1]->buffer())->atom.size;
- for (Ports::iterator i = _ports.begin(); i != _ports.end(); ++i) {
- pre_process_port(_engine.process_context(), *i);
+ for (auto& p : _ports) {
+ pre_process_port(_engine.process_context(), p);
}
_engine.run(nframes);
@@ -194,8 +194,8 @@ public:
flush_to_ui(_engine.process_context());
- for (Ports::iterator i = _ports.begin(); i != _ports.end(); ++i) {
- post_process_port(_engine.process_context(), *i);
+ for (auto& p : _ports) {
+ post_process_port(_engine.process_context(), p);
}
_frame_time += nframes;
@@ -210,9 +210,9 @@ public:
virtual GraphImpl* root_graph() { return _root_graph; }
virtual EnginePort* get_port(const Raul::Path& path) {
- for (Ports::iterator i = _ports.begin(); i != _ports.end(); ++i) {
- if ((*i)->graph_port()->path() == path) {
- return *i;
+ for (auto& p : _ports) {
+ if (p->graph_port()->path() == path) {
+ return p;
}
}
@@ -508,9 +508,9 @@ ingen_instantiate(const LV2_Descriptor* descriptor,
Glib::filename_to_uri(Ingen::bundle_file_path("manifest.ttl")));
const LV2Graph* graph = NULL;
- for (Lib::Graphs::iterator i = graphs.begin(); i != graphs.end(); ++i) {
- if ((*i)->uri == descriptor->URI) {
- graph = (*i).get();
+ for (const auto& g : graphs) {
+ if (g->uri == descriptor->URI) {
+ graph = g.get();
break;
}
}