Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'intern/moto/include/GEN_Map.h')
-rw-r--r--intern/moto/include/GEN_Map.h18
1 files changed, 18 insertions, 0 deletions
diff --git a/intern/moto/include/GEN_Map.h b/intern/moto/include/GEN_Map.h
index db3335d6110..9f56924419e 100644
--- a/intern/moto/include/GEN_Map.h
+++ b/intern/moto/include/GEN_Map.h
@@ -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) {