svn merge -r 15392:15551 https://svn.blender.org/svnroot/bf-blender/trunk/blender
[blender.git] / intern / moto / include / GEN_Map.h
index db3335d6110f7003943331bcadd6b13e7125bbac..9f56924419ea32be776a65f4345e26d01a140841 100644 (file)
@@ -82,6 +82,24 @@ public:
         }
         return 0;
     }
+
+    Key* getKey(int index) {
+        int count=0;
+        for (int i=0;i<m_num_buckets;i++)
+        {
+            Entry* bucket = m_buckets[i];
+            while(bucket)
+            {
+                if (count==index)
+                {
+                    return &bucket->m_key;
+                }
+                bucket = bucket->m_next;
+                count++;
+            }
+        }
+        return 0;
+    }
     
     void clear() {
         for (int i = 0; i < m_num_buckets; ++i) {