summaryrefslogtreecommitdiffstats
path: root/src/AtomReader.cpp
diff options
context:
space:
mode:
authorDavid Robillard <d@drobilla.net>2015-10-26 16:29:11 +0000
committerDavid Robillard <d@drobilla.net>2015-10-26 16:29:11 +0000
commit965a74ae42dae3ff42f1dcc7c53dddb2b5a31b09 (patch)
tree10fddc515234d9a1fc5724d134b88eb8c124904f /src/AtomReader.cpp
parent06eb959bf1c249dd66a5a56b78df0ad0de7df29c (diff)
downloadingen-965a74ae42dae3ff42f1dcc7c53dddb2b5a31b09.tar.gz
ingen-965a74ae42dae3ff42f1dcc7c53dddb2b5a31b09.tar.bz2
ingen-965a74ae42dae3ff42f1dcc7c53dddb2b5a31b09.zip
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
Diffstat (limited to 'src/AtomReader.cpp')
-rw-r--r--src/AtomReader.cpp9
1 files changed, 4 insertions, 5 deletions
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;