From 965a74ae42dae3ff42f1dcc7c53dddb2b5a31b09 Mon Sep 17 00:00:00 2001 From: David Robillard Date: Mon, 26 Oct 2015 16:29:11 +0000 Subject: Use URIDs almost everywhere This fixes some issues where types are lost after saving and re-loading many times. git-svn-id: http://svn.drobilla.net/lad/trunk/ingen@5788 a436a847-0d15-0410-975c-d299462d15a1 --- src/AtomReader.cpp | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) (limited to 'src/AtomReader.cpp') diff --git a/src/AtomReader.cpp b/src/AtomReader.cpp index 12d2f1a5..ef59e1b5 100644 --- a/src/AtomReader.cpp +++ b/src/AtomReader.cpp @@ -44,9 +44,9 @@ AtomReader::get_atom(const LV2_Atom* in, Atom& out) if (in) { if (in->type == _uris.atom_URID) { const LV2_Atom_URID* urid = (const LV2_Atom_URID*)in; - const char* uri = _map.unmap_uri(urid->body); + const char* uri = _map.unmap_uri(urid->body); if (uri) { - out = _forge.alloc_uri(_map.unmap_uri(urid->body)); + out = _forge.make_urid(urid->body); } else { _log.error(fmt("Unable to unmap URID %1%\n") % urid->body); } @@ -61,9 +61,8 @@ AtomReader::get_props(const LV2_Atom_Object* obj, Ingen::Resource::Properties& props) { if (obj->body.otype) { - props.insert( - std::make_pair(_uris.rdf_type, - _forge.alloc_uri(_map.unmap_uri(obj->body.otype)))); + props.insert(std::make_pair(_uris.rdf_type, + _forge.make_urid(obj->body.otype))); } LV2_ATOM_OBJECT_FOREACH(obj, p) { Atom val; -- cgit v1.2.1