From 6f6ab43c58693a6c509500d5365eb36ad4a2a571 Mon Sep 17 00:00:00 2001 From: David Robillard Date: Fri, 29 Aug 2014 22:50:20 +0000 Subject: Add compile-time feature to log URID mapping. git-svn-id: http://svn.drobilla.net/lad/trunk/ingen@5458 a436a847-0d15-0410-975c-d299462d15a1 --- src/URIMap.cpp | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) (limited to 'src') diff --git a/src/URIMap.cpp b/src/URIMap.cpp index b5fe8712..d770a493 100644 --- a/src/URIMap.cpp +++ b/src/URIMap.cpp @@ -89,13 +89,21 @@ URIMap::URIDUnmapFeature::unmap(LV2_URID urid) uint32_t URIMap::map_uri(const char* uri) { - return _urid_map_feature->map(uri); + const uint32_t urid = _urid_map_feature->map(uri); +#ifdef INGEN_DEBUG_URIDS + fprintf(stderr, "Map URI %3u <= %s\n", urid, uri); +#endif + return urid; } const char* URIMap::unmap_uri(uint32_t urid) const { - return _urid_unmap_feature->unmap(urid); + const char* uri = _urid_unmap_feature->unmap(urid); +#ifdef INGEN_DEBUG_URIDS + fprintf(stderr, "Unmap URI %3u => %s\n", urid, uri); +#endif + return uri; } } // namespace Ingen -- cgit v1.2.1