diff options
author | David Robillard <d@drobilla.net> | 2012-03-12 06:59:48 +0000 |
---|---|---|
committer | David Robillard <d@drobilla.net> | 2012-03-12 06:59:48 +0000 |
commit | 81e9fb3245bd461ebfee4cfa16d1792e48533f9e (patch) | |
tree | eb1b30d79cba70dda9d832100dd7c14b08085b03 /src/serialisation/Serialiser.cpp | |
parent | e9d9569271ee962c09ab66c6babed1ca5655a6c6 (diff) | |
download | ingen-81e9fb3245bd461ebfee4cfa16d1792e48533f9e.tar.gz ingen-81e9fb3245bd461ebfee4cfa16d1792e48533f9e.tar.bz2 ingen-81e9fb3245bd461ebfee4cfa16d1792e48533f9e.zip |
Centralise atom creation in forge object.
Aside from being more greppable and making realtime violations more obvious, this is a step towards using LV2 atoms internally (which needs a factory since the type numbers are dynamic).
git-svn-id: http://svn.drobilla.net/lad/trunk/ingen@4054 a436a847-0d15-0410-975c-d299462d15a1
Diffstat (limited to 'src/serialisation/Serialiser.cpp')
-rw-r--r-- | src/serialisation/Serialiser.cpp | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/src/serialisation/Serialiser.cpp b/src/serialisation/Serialiser.cpp index 1e608806..7f9b8cc3 100644 --- a/src/serialisation/Serialiser.cpp +++ b/src/serialisation/Serialiser.cpp @@ -453,7 +453,8 @@ Serialiser::Impl::serialise_patch(SharedPtr<const Patch> patch, // Ensure lv2:name always exists so Patch is a valid LV2 plugin if (p->properties().find(NS_LV2 "name") == p->properties().end()) - p->set_property(NS_LV2 "name", Atom(p->symbol().c_str())); + p->set_property(NS_LV2 "name", + _world.forge().make(p->symbol().c_str())); _model->add_statement(patch_id, Sord::URI(world, NS_LV2 "port"), @@ -521,7 +522,7 @@ Serialiser::Impl::serialise_port(const Port* port, _model->add_statement( port_id, Sord::Curie(world, "lv2:index"), - AtomRDF::atom_to_node(*_model, Atom((int)port->index()))); + AtomRDF::atom_to_node(*_model, _world.forge().make((int)port->index()))); } } |