aboutsummaryrefslogtreecommitdiff
path: root/src/ptr_map.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/ptr_map.cpp')
-rw-r--r--src/ptr_map.cpp21
1 files changed, 21 insertions, 0 deletions
diff --git a/src/ptr_map.cpp b/src/ptr_map.cpp
index 43e793b8a..ed4b20bf8 100644
--- a/src/ptr_map.cpp
+++ b/src/ptr_map.cpp
@@ -339,3 +339,24 @@ void multi_map_remove_all(PtrMap<K, V> *h, K key) {
}
}
#endif
+
+
+template <typename K, typename V>
+PtrMapEntry<K, V> *begin(PtrMap<K, V> &m) {
+ return m.entries.data;
+}
+template <typename K, typename V>
+PtrMapEntry<K, V> const *begin(PtrMap<K, V> const &m) {
+ return m.entries.data;
+}
+
+
+template <typename K, typename V>
+PtrMapEntry<K, V> *end(PtrMap<K, V> &m) {
+ return m.entries.data + m.entries.count;
+}
+
+template <typename K, typename V>
+PtrMapEntry<K, V> const *end(PtrMap<K, V> const &m) {
+ return m.entries.data + m.entries.count;
+}