diff options
Diffstat (limited to 'src/ptr_set.cpp')
| -rw-r--r-- | src/ptr_set.cpp | 21 |
1 files changed, 21 insertions, 0 deletions
diff --git a/src/ptr_set.cpp b/src/ptr_set.cpp index ffe48d69a..04ce162e2 100644 --- a/src/ptr_set.cpp +++ b/src/ptr_set.cpp @@ -233,3 +233,24 @@ gb_inline void ptr_set_clear(PtrSet<T> *s) { s->hashes.data[i] = MAP_SENTINEL; } } + + +template <typename T> +PtrSetEntry<T> *begin(PtrSet<T> &m) { + return m.entries.data; +} +template <typename T> +PtrSetEntry<T> const *begin(PtrSet<T> const &m) { + return m.entries.data; +} + + +template <typename T> +PtrSetEntry<T> *end(PtrSet<T> &m) { + return m.entries.data + m.entries.count; +} + +template <typename T> +PtrSetEntry<T> const *end(PtrSet<T> const &m) { + return m.entries.data + m.entries.count; +}
\ No newline at end of file |