diff options
Diffstat (limited to 'test/lilv_test_uri_map.h')
-rw-r--r-- | test/lilv_test_uri_map.h | 26 |
1 files changed, 6 insertions, 20 deletions
diff --git a/test/lilv_test_uri_map.h b/test/lilv_test_uri_map.h index 5f85c86..b4fba0f 100644 --- a/test/lilv_test_uri_map.h +++ b/test/lilv_test_uri_map.h @@ -1,18 +1,5 @@ -/* - Copyright 2007-2020 David Robillard <d@drobilla.net> - - Permission to use, copy, modify, and/or distribute this software for any - purpose with or without fee is hereby granted, provided that the above - copyright notice and this permission notice appear in all copies. - - THIS SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES - WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF - MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR - ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES - WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN - ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF - OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. -*/ +// Copyright 2007-2020 David Robillard <d@drobilla.net> +// SPDX-License-Identifier: ISC #ifndef LILV_TEST_URI_MAP_H #define LILV_TEST_URI_MAP_H @@ -23,14 +10,13 @@ #include "serd/serd.h" #include <assert.h> -#include <stddef.h> #include <stdint.h> #include <stdlib.h> #include <string.h> typedef struct { - char** uris; - size_t n_uris; + char** uris; + uint32_t n_uris; } LilvTestUriMap; static inline void @@ -43,7 +29,7 @@ lilv_test_uri_map_init(LilvTestUriMap* const map) static inline void lilv_test_uri_map_clear(LilvTestUriMap* const map) { - for (size_t i = 0; i < map->n_uris; ++i) { + for (uint32_t i = 0; i < map->n_uris; ++i) { free(map->uris[i]); } @@ -57,7 +43,7 @@ map_uri(LV2_URID_Map_Handle handle, const char* uri) { LilvTestUriMap* map = (LilvTestUriMap*)handle; - for (size_t i = 0; i < map->n_uris; ++i) { + for (uint32_t i = 0; i < map->n_uris; ++i) { if (!strcmp(map->uris[i], uri)) { return i + 1; } |