diff options
Diffstat (limited to 'include/lv2/atom')
-rw-r--r-- | include/lv2/atom/atom.h | 2 | ||||
-rw-r--r-- | include/lv2/atom/forge.h | 5 | ||||
-rw-r--r-- | include/lv2/atom/util.h | 6 |
3 files changed, 7 insertions, 6 deletions
diff --git a/include/lv2/atom/atom.h b/include/lv2/atom/atom.h index 44f597a..ca607d3 100644 --- a/include/lv2/atom/atom.h +++ b/include/lv2/atom/atom.h @@ -215,7 +215,7 @@ typedef struct { | Event 1 (size 6) | Event 2 | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | - |FRAMES |TYPE |SIZE |DATADATADATAPAD|FRAMES |... + |FRAMES |SIZE |TYPE |DATADATADATAPAD|FRAMES |... </pre> */ typedef struct { diff --git a/include/lv2/atom/forge.h b/include/lv2/atom/forge.h index 5656079..f894a5a 100644 --- a/include/lv2/atom/forge.h +++ b/include/lv2/atom/forge.h @@ -147,6 +147,7 @@ lv2_atom_forge_init(LV2_Atom_Forge* forge, LV2_URID_Map* map) static inline LV2_Atom* lv2_atom_forge_deref(LV2_Atom_Forge* forge, LV2_Atom_Forge_Ref ref) { + // NOLINTNEXTLINE(performance-no-int-to-ptr) return forge->buf ? (LV2_Atom*)ref : forge->deref(forge->handle, ref); } @@ -305,7 +306,7 @@ lv2_atom_forge_pad(LV2_Atom_Forge* forge, uint32_t written) static inline LV2_Atom_Forge_Ref lv2_atom_forge_write(LV2_Atom_Forge* forge, const void* data, uint32_t size) { - LV2_Atom_Forge_Ref out = lv2_atom_forge_raw(forge, data, size); + const LV2_Atom_Forge_Ref out = lv2_atom_forge_raw(forge, data, size); if (out) { lv2_atom_forge_pad(forge, size); } @@ -494,7 +495,7 @@ lv2_atom_forge_vector(LV2_Atom_Forge* forge, {(uint32_t)sizeof(LV2_Atom_Vector_Body) + n_elems * child_size, forge->Vector}, {child_size, child_type}}; - LV2_Atom_Forge_Ref out = lv2_atom_forge_write(forge, &a, sizeof(a)); + const LV2_Atom_Forge_Ref out = lv2_atom_forge_write(forge, &a, sizeof(a)); if (out) { lv2_atom_forge_write(forge, elems, child_size * n_elems); } diff --git a/include/lv2/atom/util.h b/include/lv2/atom/util.h index 556fb58..a2369da 100644 --- a/include/lv2/atom/util.h +++ b/include/lv2/atom/util.h @@ -13,7 +13,7 @@ */ /** - @defgroup util Utilities + @defgroup atom_util Utilities @ingroup atom Utilities for working with atoms. @@ -373,7 +373,7 @@ lv2_atom_object_body_get(uint32_t size, const LV2_Atom_Object_Body* body, ...) LV2_ATOM_OBJECT_BODY_FOREACH (body, size, prop) { va_start(args, body); for (int i = 0; i < n_queries; ++i) { - uint32_t qkey = va_arg(args, uint32_t); + const uint32_t qkey = va_arg(args, uint32_t); const LV2_Atom** qval = va_arg(args, const LV2_Atom**); if (qkey == prop->key && !*qval) { *qval = &prop->value; @@ -428,7 +428,7 @@ lv2_atom_object_get(const LV2_Atom_Object* object, ...) LV2_ATOM_OBJECT_FOREACH (object, prop) { va_start(args, object); for (int i = 0; i < n_queries; ++i) { - uint32_t qkey = va_arg(args, uint32_t); + const uint32_t qkey = va_arg(args, uint32_t); const LV2_Atom** qval = va_arg(args, const LV2_Atom**); if (qkey == prop->key && !*qval) { *qval = &prop->value; |