Commit 305c3f0f authored by Hanspeter Portner's avatar Hanspeter Portner

replace lv2_atom_object_get instead of query.

* gcc 7.x shows an optimization bug.
parent c615ee18
Pipeline #15923703 passed with stages
in 6 minutes
......@@ -2243,13 +2243,11 @@ moony_in(moony_t *moony, const LV2_Atom_Sequence *control, LV2_Atom_Sequence *no
const LV2_Atom_URID *property = NULL;
const LV2_Atom_Int *sequence= NULL;
LV2_Atom_Object_Query q[] = {
{ moony->uris.patch.subject, (const LV2_Atom **)&subject },
{ moony->uris.patch.property, (const LV2_Atom **)&property },
{ moony->uris.patch.sequence, (const LV2_Atom **)&sequence},
{ 0, NULL }
};
lv2_atom_object_query(obj, q);
lv2_atom_object_get(obj,
moony->uris.patch.subject, &subject,
moony->uris.patch.property, &property,
moony->uris.patch.sequence, &sequence,
0);
int32_t sequence_num = 0;
if(sequence && (sequence->atom.type == moony->forge.Int))
......@@ -2335,14 +2333,12 @@ moony_in(moony_t *moony, const LV2_Atom_Sequence *control, LV2_Atom_Sequence *no
const LV2_Atom_Int *sequence = NULL;
const LV2_Atom *value = NULL;
LV2_Atom_Object_Query q[] = {
{ moony->uris.patch.subject, (const LV2_Atom **)&subject },
{ moony->uris.patch.property, (const LV2_Atom **)&property },
{ moony->uris.patch.sequence, (const LV2_Atom **)&sequence },
{ moony->uris.patch.value, &value },
{ 0, NULL }
};
lv2_atom_object_query(obj, q);
lv2_atom_object_get(obj,
moony->uris.patch.subject, &subject,
moony->uris.patch.property, &property,
moony->uris.patch.sequence, &sequence,
moony->uris.patch.value, &value,
0);
int32_t sequence_num = 0;
if(sequence && (sequence->atom.type == moony->forge.Int))
......
......@@ -403,14 +403,12 @@ port_event(LV2UI_Handle handle, uint32_t port_index, uint32_t buffer_size,
const LV2_Atom_URID *subject = NULL;
const LV2_Atom_URID *property = NULL;
const LV2_Atom_String *value = NULL;
LV2_Atom_Object_Query q[] = {
{ ui->uris.patch.subject, (const LV2_Atom **)&subject },
{ ui->uris.patch.property, (const LV2_Atom **)&property },
{ ui->uris.patch.value, (const LV2_Atom **)&value },
{ 0, NULL }
};
lv2_atom_object_query(obj, q);
lv2_atom_object_get(obj,
ui->uris.patch.subject, &subject,
ui->uris.patch.property, &property,
ui->uris.patch.value, &value,
0);
//FIXME check subject
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment