diff options
author | David Robillard <d@drobilla.net> | 2023-09-22 12:33:28 -0400 |
---|---|---|
committer | David Robillard <d@drobilla.net> | 2023-09-22 12:33:42 -0400 |
commit | eec5a4d6cda054eb5db767f71dece42e3343b482 (patch) | |
tree | 118426d4d0ac73c433bcca1b56d9dba2dadcf359 /include/lv2/atom | |
parent | 37178cf290aaaeef1a3d3608831d94ce649e0ee0 (diff) | |
download | lv2-eec5a4d6cda054eb5db767f71dece42e3343b482.tar.xz |
Add missing const qualifiers
Diffstat (limited to 'include/lv2/atom')
-rw-r--r-- | include/lv2/atom/forge.h | 4 | ||||
-rw-r--r-- | include/lv2/atom/util.h | 4 |
2 files changed, 4 insertions, 4 deletions
diff --git a/include/lv2/atom/forge.h b/include/lv2/atom/forge.h index d651d70..f894a5a 100644 --- a/include/lv2/atom/forge.h +++ b/include/lv2/atom/forge.h @@ -306,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); } @@ -495,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..b1a1e93 100644 --- a/include/lv2/atom/util.h +++ b/include/lv2/atom/util.h @@ -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; |