From 2c6db7e54c8124a7dd49d04fa949c3351676aee1 Mon Sep 17 00:00:00 2001 From: David Robillard Date: Sat, 21 May 2011 00:12:46 +0000 Subject: Fix patch loading. git-svn-id: http://svn.drobilla.net/lad/trunk/ingen@3304 a436a847-0d15-0410-975c-d299462d15a1 --- include/ingen/Resource.hpp | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) (limited to 'include') diff --git a/include/ingen/Resource.hpp b/include/ingen/Resource.hpp index 136c2df8..6404213c 100644 --- a/include/ingen/Resource.hpp +++ b/include/ingen/Resource.hpp @@ -25,7 +25,7 @@ #include "raul/URI.hpp" #include "raul/log.hpp" -#define NS_INGEN "http://drobilla.net/software/ingen#" +#define NS_INGEN "http://drobilla.net/ns/ingen#" namespace Ingen { @@ -42,21 +42,20 @@ public: switch (g) { default: case DEFAULT: - return "http://drobilla.net/software/ingen#defaultContext"; + return NS_INGEN "defaultContext"; case EXTERNAL: - return "http://drobilla.net/software/ingen#externalContext"; + return NS_INGEN "externalContext"; case INTERNAL: - return "http://drobilla.net/software/ingen#internalContext"; + return NS_INGEN "internalContext"; } } static Graph uri_to_graph(const char* uri) { - const size_t prefix_len = strlen("http://drobilla.net/software/ingen#"); if (strncmp(uri, NS_INGEN, sizeof(NS_INGEN) - 1)) { return DEFAULT; } - const char* suffix = uri + prefix_len; + const char* suffix = uri + sizeof(NS_INGEN) - 1; if (!strcmp(suffix, "defaultContext")) { return DEFAULT; } else if (!strcmp(suffix, "externalContext")) { -- cgit v1.2.1