summaryrefslogtreecommitdiffstats
path: root/src/gui
diff options
context:
space:
mode:
authorDavid Robillard <d@drobilla.net>2013-02-23 23:41:40 +0000
committerDavid Robillard <d@drobilla.net>2013-02-23 23:41:40 +0000
commitc09203d0caa4695bec58a8bf84e31ff69de5eb61 (patch)
tree91bf42b0354dc7afd223f83286356260a7d5584b /src/gui
parent400bbe503f44d306f5488eb850cde0723f8844f5 (diff)
downloadingen-c09203d0caa4695bec58a8bf84e31ff69de5eb61.tar.gz
ingen-c09203d0caa4695bec58a8bf84e31ff69de5eb61.tar.bz2
ingen-c09203d0caa4695bec58a8bf84e31ff69de5eb61.zip
Make Atom always have an LV2_Atom so it can be used in-place.
Add missing file. git-svn-id: http://svn.drobilla.net/lad/trunk/ingen@5080 a436a847-0d15-0410-975c-d299462d15a1
Diffstat (limited to 'src/gui')
-rw-r--r--src/gui/NodeModule.cpp7
1 files changed, 1 insertions, 6 deletions
diff --git a/src/gui/NodeModule.cpp b/src/gui/NodeModule.cpp
index 9bbd48c2..e0509c51 100644
--- a/src/gui/NodeModule.cpp
+++ b/src/gui/NodeModule.cpp
@@ -173,14 +173,9 @@ NodeModule::port_activity(uint32_t index, const Atom& value)
if (value.type() == uris.atom_Float) {
_plugin_ui->port_event(index, sizeof(float), 0, value.ptr<float>());
} else {
- // FIXME: Well, this sucks...
- LV2_Atom* atom = (LV2_Atom*)malloc(sizeof(LV2_Atom) + value.size());
- atom->type = value.type();
- atom->size = value.size();
- memcpy(LV2_ATOM_BODY(atom), value.get_body(), value.size());
+ const LV2_Atom* const atom = value.atom();
_plugin_ui->port_event(
index, lv2_atom_total_size(atom), uris.atom_eventTransfer, atom);
- free(atom);
}
}