Use lilv_world_get()
authorDavid Robillard <d@drobilla.net>
Thu, 20 Dec 2018 01:06:53 +0000 (20:06 -0500)
committerDavid Robillard <d@drobilla.net>
Thu, 20 Dec 2018 01:08:47 +0000 (20:08 -0500)
Leaves the now-trivial get_value() helper there since it keeps the call sites
shorter and nicer to read.

libs/ardour/lv2_plugin.cc

index 772d282f88774471670bf9d1a7ebf9d53d2158b8..99841e34d7b8451eda49bc95dbc2a60791c10d8a 100644 (file)
@@ -1444,17 +1444,10 @@ LV2Plugin::add_state(XMLNode* root) const
        }
 }
 
-// TODO: Once we can rely on lilv 0.16.0, lilv_world_get can replace this
 static LilvNode*
 get_value(LilvWorld* world, const LilvNode* subject, const LilvNode* predicate)
 {
-       LilvNodes* vs = lilv_world_find_nodes(world, subject, predicate, NULL);
-       if (vs) {
-               LilvNode* node = lilv_node_duplicate(lilv_nodes_get_first(vs));
-               lilv_nodes_free(vs);
-               return node;
-       }
-       return NULL;
+       return lilv_world_get(world, subject, predicate, NULL);
 }
 
 void