aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorHanspeter Portner <dev@open-music-kontrollers.ch>2018-01-08 22:30:10 +0100
committerHanspeter Portner <dev@open-music-kontrollers.ch>2018-01-08 22:30:10 +0100
commit968816f5744f3886feaa2fa9bb8104f938dfc6ff (patch)
treedc6de5dddb3a9f7a899a6d2cb1575eecf5cb1b02
parent70700f540754b9ffd18059ef9e94ff4745fd0dd3 (diff)
downloadprops.lv2-968816f5744f3886feaa2fa9bb8104f938dfc6ff.tar.xz
migrate to lv2_atom_object_get from *_query.
* gcc 7.x shows an optimization bug with *_query.
-rw-r--r--props.h38
1 files changed, 16 insertions, 22 deletions
diff --git a/props.h b/props.h
index 896bfd7..6151b8d 100644
--- a/props.h
+++ b/props.h
@@ -592,13 +592,11 @@ props_advance(props_t *props, LV2_Atom_Forge *forge, uint32_t frames,
const LV2_Atom_URID *property = NULL;
const LV2_Atom_Int *sequence = NULL;
- LV2_Atom_Object_Query q [] = {
- { props->urid.patch_subject, (const LV2_Atom **)&subject },
- { props->urid.patch_property, (const LV2_Atom **)&property },
- { props->urid.patch_sequence, (const LV2_Atom **)&sequence },
- LV2_ATOM_OBJECT_QUERY_END
- };
- lv2_atom_object_query(obj, q);
+ lv2_atom_object_get(obj,
+ props->urid.patch_subject, &subject,
+ props->urid.patch_property, &property,
+ props->urid.patch_sequence, &sequence,
+ 0);
// check for a matching optional subject
if( (subject && props->urid.subject)
@@ -656,14 +654,12 @@ props_advance(props_t *props, LV2_Atom_Forge *forge, uint32_t frames,
const LV2_Atom_Int *sequence = NULL;
const LV2_Atom *value = NULL;
- LV2_Atom_Object_Query q [] = {
- { props->urid.patch_subject, (const LV2_Atom **)&subject },
- { props->urid.patch_property, (const LV2_Atom **)&property },
- { props->urid.patch_sequence, (const LV2_Atom **)&sequence },
- { props->urid.patch_value, &value },
- LV2_ATOM_OBJECT_QUERY_END
- };
- lv2_atom_object_query(obj, q);
+ lv2_atom_object_get(obj,
+ props->urid.patch_subject, &subject,
+ props->urid.patch_property, &property,
+ props->urid.patch_sequence, &sequence,
+ props->urid.patch_value, &value,
+ 0);
// check for a matching optional subject
if( (subject && props->urid.subject)
@@ -717,13 +713,11 @@ props_advance(props_t *props, LV2_Atom_Forge *forge, uint32_t frames,
const LV2_Atom_Int *sequence = NULL;
const LV2_Atom_Object *body = NULL;
- LV2_Atom_Object_Query q [] = {
- { props->urid.patch_subject, (const LV2_Atom **)&subject },
- { props->urid.patch_sequence, (const LV2_Atom **)&sequence},
- { props->urid.patch_body, (const LV2_Atom **)&body },
- LV2_ATOM_OBJECT_QUERY_END
- };
- lv2_atom_object_query(obj, q);
+ lv2_atom_object_get(obj,
+ props->urid.patch_subject, &subject,
+ props->urid.patch_sequence, &sequence,
+ props->urid.patch_body, &body,
+ 0);
// check for a matching optional subject
if( (subject && props->urid.subject)