summaryrefslogtreecommitdiffstats
path: root/src/serialisation
diff options
context:
space:
mode:
authorDavid Robillard <d@drobilla.net>2012-08-10 20:36:36 +0000
committerDavid Robillard <d@drobilla.net>2012-08-10 20:36:36 +0000
commit762435ea92bbeed0b36afc5fa4303540f3e72ba1 (patch)
treebb503e6f6d7788f45c398ffb0f35b42f73390a40 /src/serialisation
parent16d7c76a60f8bedd23f1b3fb1f5357b0d548dab2 (diff)
downloadingen-762435ea92bbeed0b36afc5fa4303540f3e72ba1.tar.gz
ingen-762435ea92bbeed0b36afc5fa4303540f3e72ba1.tar.bz2
ingen-762435ea92bbeed0b36afc5fa4303540f3e72ba1.zip
Fix various const violations.
git-svn-id: http://svn.drobilla.net/lad/trunk/ingen@4647 a436a847-0d15-0410-975c-d299462d15a1
Diffstat (limited to 'src/serialisation')
-rw-r--r--src/serialisation/Parser.cpp12
1 files changed, 7 insertions, 5 deletions
diff --git a/src/serialisation/Parser.cpp b/src/serialisation/Parser.cpp
index f124722c..363e9c15 100644
--- a/src/serialisation/Parser.cpp
+++ b/src/serialisation/Parser.cpp
@@ -25,10 +25,11 @@
#include <glibmm/ustring.h>
#include "ingen/Interface.hpp"
-#include "ingen/serialisation/Parser.hpp"
#include "ingen/URIMap.hpp"
#include "ingen/URIs.hpp"
#include "ingen/World.hpp"
+#include "ingen/serialisation/Parser.hpp"
+#include "lv2/lv2plug.in/ns/ext/atom/atom.h"
#include "raul/Atom.hpp"
#include "raul/log.hpp"
#include "serd/serd.h"
@@ -114,15 +115,16 @@ get_properties(Ingen::World* world,
out.len = 0;
sratom_read(sratom, &forge, world->rdf_world()->c_obj(),
model.c_obj(), i.get_object().c_obj());
- LV2_Atom* atom = (LV2_Atom*)out.buf;
- Atom atomm;
+ const LV2_Atom* atom = (const LV2_Atom*)out.buf;
+ Atom atomm;
// FIXME: Don't bloat out all URIs
if (atom->type == forge.URID) {
atomm = world->forge().alloc_uri(
- unmap->unmap(unmap->handle, *(uint32_t*)LV2_ATOM_BODY(atom)));
+ unmap->unmap(unmap->handle,
+ ((const LV2_Atom_URID*)atom)->body));
} else {
atomm = world->forge().alloc(
- atom->size, atom->type, LV2_ATOM_BODY(atom));
+ atom->size, atom->type, LV2_ATOM_BODY_CONST(atom));
}
props.insert(make_pair(i.get_predicate().to_string(), atomm));
}