From c09203d0caa4695bec58a8bf84e31ff69de5eb61 Mon Sep 17 00:00:00 2001 From: David Robillard Date: Sat, 23 Feb 2013 23:41:40 +0000 Subject: 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 --- src/gui/NodeModule.cpp | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) (limited to 'src/gui') 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()); } 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); } } -- cgit v1.2.1