diff options
| author | gingerBill <bill@gingerbill.org> | 2022-12-09 11:29:28 +0000 |
|---|---|---|
| committer | gingerBill <bill@gingerbill.org> | 2022-12-09 11:29:28 +0000 |
| commit | 34a048f7daaf93b16ae4121bf5238f9008f3465b (patch) | |
| tree | 3857fdc80f73522a8b2af265f257a4decd447afd /src/string_set.cpp | |
| parent | ffe953b43d1ad31d2c37f544a1d389e30d8f69bf (diff) | |
Replace compiler for loops for the hash-table types to simplify code usage
Diffstat (limited to 'src/string_set.cpp')
| -rw-r--r-- | src/string_set.cpp | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/src/string_set.cpp b/src/string_set.cpp index 746ad9529..fce98ec75 100644 --- a/src/string_set.cpp +++ b/src/string_set.cpp @@ -215,3 +215,21 @@ gb_inline void string_set_clear(StringSet *s) { s->hashes.data[i] = MAP_SENTINEL; } } + + + +StringSetEntry *begin(StringSet &m) { + return m.entries.data; +} +StringSetEntry const *begin(StringSet const &m) { + return m.entries.data; +} + + +StringSetEntry *end(StringSet &m) { + return m.entries.data + m.entries.count; +} + +StringSetEntry const *end(StringSet const &m) { + return m.entries.data + m.entries.count; +}
\ No newline at end of file |