diff options
author | David Robillard <d@drobilla.net> | 2025-01-10 09:59:29 -0500 |
---|---|---|
committer | David Robillard <d@drobilla.net> | 2025-01-10 10:19:17 -0500 |
commit | fccae6d1db416835dab147554d832a1726e68a5a (patch) | |
tree | 7f362e92a852da810044e8dc7fc814509874bb06 /src | |
parent | 2647831aa62c4b0cef27cec0eec42c5fc3ef412b (diff) | |
download | sratom-fccae6d1db416835dab147554d832a1726e68a5a.tar.gz sratom-fccae6d1db416835dab147554d832a1726e68a5a.tar.bz2 sratom-fccae6d1db416835dab147554d832a1726e68a5a.zip |
Make loop variable const
Avoids a constVariablePointer warning from cppcheck. Unfortunately, some of
the atom utilities violate const-correctness, so avoid using
LV2_ATOM_SEQUENCE_BODY_FOREACH and just write the loop out manually.
Diffstat (limited to 'src')
-rw-r--r-- | src/sratom.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/src/sratom.c b/src/sratom.c index fe48750..cffa501 100644 --- a/src/sratom.c +++ b/src/sratom.c @@ -453,7 +453,9 @@ sratom_write(Sratom* sratom, start_object(sratom, &flags, subject, predicate, &id, type); SerdNode p = serd_node_from_string(SERD_URI, NS_RDF "value"); flags |= SERD_LIST_O_BEGIN; - LV2_ATOM_SEQUENCE_BODY_FOREACH (seq, size, ev) { + for (const LV2_Atom_Event* ev = lv2_atom_sequence_begin(seq); + !lv2_atom_sequence_is_end(seq, size, ev); + ev = lv2_atom_sequence_next(ev)) { sratom->seq_unit = seq->unit; list_append(sratom, unmap, |