From ec8939dd7ef5267b43bd8ae3590e783495f0cfc9 Mon Sep 17 00:00:00 2001 From: David Robillard Date: Sat, 18 Jan 2014 06:25:36 +0000 Subject: Consolidate URIs. Add missing definition to ontology. git-svn-id: http://svn.drobilla.net/lad/trunk/ingen@5317 a436a847-0d15-0410-975c-d299462d15a1 --- src/Configuration.cpp | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) (limited to 'src/Configuration.cpp') diff --git a/src/Configuration.cpp b/src/Configuration.cpp index ad4ab09a..67899d9a 100644 --- a/src/Configuration.cpp +++ b/src/Configuration.cpp @@ -25,11 +25,10 @@ #include "ingen/Configuration.hpp" #include "ingen/Log.hpp" +#include "ingen/ingen.h" #include "sord/sordmm.hpp" #include "sratom/sratom.h" -#define NS_INGEN "http://drobilla.net/ns/ingen#" - namespace Ingen { Configuration::Configuration(Forge& forge) @@ -209,8 +208,8 @@ Configuration::load(const std::string& path) for (Sord::Iter i = model.find(nodemm, nil, nil); !i.end(); ++i) { const Sord::Node& pred = i.get_predicate(); const Sord::Node& obj = i.get_object(); - if (pred.to_string().substr(0, sizeof(NS_INGEN) - 1) == NS_INGEN) { - const std::string key = pred.to_string().substr(sizeof(NS_INGEN) - 1); + if (pred.to_string().substr(0, sizeof(INGEN_NS) - 1) == INGEN_NS) { + const std::string key = pred.to_string().substr(sizeof(INGEN_NS) - 1); const Keys::iterator k = _keys.find(key); if (k != _keys.end() && obj.type() == Sord::Node::LITERAL) { set_value_from_string(_options.find(k->second)->second, @@ -259,7 +258,7 @@ Configuration::save(URIMap& uri_map, // Create environment with ingen prefix SerdEnv* env = serd_env_new(&base); serd_env_set_prefix_from_strings( - env, (const uint8_t*)"ingen", (const uint8_t*)NS_INGEN); + env, (const uint8_t*)"ingen", (const uint8_t*)INGEN_NS); // Create Turtle writer SerdWriter* writer = serd_writer_new( -- cgit v1.2.1