From 7703427f6832cb3195580fda0ab506e7c2948032 Mon Sep 17 00:00:00 2001 From: David Robillard Date: Wed, 9 Mar 2011 18:12:07 +0000 Subject: Update for new SLV2 API. git-svn-id: http://svn.drobilla.net/lad/trunk/ingen@3058 a436a847-0d15-0410-975c-d299462d15a1 --- src/engine/NodeFactory.cpp | 9 ++------- 1 file changed, 2 insertions(+), 7 deletions(-) (limited to 'src/engine/NodeFactory.cpp') diff --git a/src/engine/NodeFactory.cpp b/src/engine/NodeFactory.cpp index 08584c81..266a0271 100644 --- a/src/engine/NodeFactory.cpp +++ b/src/engine/NodeFactory.cpp @@ -124,23 +124,18 @@ NodeFactory::load_lv2_plugins() { SLV2Plugins plugins = slv2_world_get_all_plugins(_world->slv2_world()); - for (unsigned i=0; i < slv2_plugins_size(plugins); ++i) { - - SLV2Plugin lv2_plug = slv2_plugins_get_at(plugins, i); + SLV2_FOREACH(i, plugins) { + SLV2Plugin lv2_plug = slv2_plugins_get(plugins, i); const string uri(slv2_value_as_uri(slv2_plugin_get_uri(lv2_plug))); -#ifndef NDEBUG assert(_plugins.find(uri) == _plugins.end()); -#endif LV2Plugin* const plugin = new LV2Plugin(_lv2_info, uri); plugin->slv2_plugin(lv2_plug); _plugins.insert(make_pair(uri, plugin)); } - - slv2_plugins_free(_world->slv2_world(), plugins); } #endif // HAVE_SLV2 -- cgit v1.2.1