diff options
author | David Robillard <d@drobilla.net> | 2022-05-27 13:37:07 -0400 |
---|---|---|
committer | David Robillard <d@drobilla.net> | 2022-05-27 13:40:33 -0400 |
commit | d22bd43dd053b060dfce40285cd968602efbce78 (patch) | |
tree | 968e688788a4da06c97cbb1bf276eaf8a1760ac6 /src/symap.c | |
parent | ea783414b68512c15b9523cde2bfb4f93e433d56 (diff) | |
download | jalv-d22bd43dd053b060dfce40285cd968602efbce78.tar.gz jalv-d22bd43dd053b060dfce40285cd968602efbce78.tar.bz2 jalv-d22bd43dd053b060dfce40285cd968602efbce78.zip |
Use consistent comment styles
Diffstat (limited to 'src/symap.c')
-rw-r--r-- | src/symap.c | 19 |
1 files changed, 6 insertions, 13 deletions
diff --git a/src/symap.c b/src/symap.c index 196c963..4a1a989 100644 --- a/src/symap.c +++ b/src/symap.c @@ -38,20 +38,13 @@ */ struct SymapImpl { - /** - Unsorted array of strings, such that the symbol for ID i is found - at symbols[i - 1]. - */ + /// Unsorted array of strings, so symbols[i] is the symbol for ID i char** symbols; - /** - Array of IDs, sorted by corresponding string in `symbols`. - */ + /// Array of IDs, sorted by corresponding string in `symbols` uint32_t* index; - /** - Number of symbols (number of items in `symbols` and `index`). - */ + /// Number of symbols (number of items in `symbols` and `index`) uint32_t size; }; @@ -160,11 +153,11 @@ symap_map(Symap* map, const char* sym) const uint32_t id = ++map->size; char* const str = symap_strdup(sym); - /* Append new symbol to symbols array */ + // Append new symbol to symbols array map->symbols = (char**)realloc(map->symbols, map->size * sizeof(str)); map->symbols[id - 1] = str; - /* Insert new index element into sorted index */ + // Insert new index element into sorted index map->index = (uint32_t*)realloc(map->index, map->size * sizeof(uint32_t)); if (index < map->size - 1) { memmove(map->index + index + 1, @@ -237,4 +230,4 @@ main() return 0; } -#endif /* STANDALONE */ +#endif // STANDALONE |