summaryrefslogtreecommitdiff
path: root/core/oa_hash_map.h
diff options
context:
space:
mode:
Diffstat (limited to 'core/oa_hash_map.h')
-rw-r--r--core/oa_hash_map.h9
1 files changed, 0 insertions, 9 deletions
diff --git a/core/oa_hash_map.h b/core/oa_hash_map.h
index b4d9ce4d51..e411ced044 100644
--- a/core/oa_hash_map.h
+++ b/core/oa_hash_map.h
@@ -50,7 +50,6 @@ template <class TKey, class TValue,
class Hasher = HashMapHasherDefault,
class Comparator = HashMapComparatorDefault<TKey>>
class OAHashMap {
-
private:
TValue *values;
TKey *keys;
@@ -110,7 +109,6 @@ private:
}
void _insert_with_hash(uint32_t p_hash, const TKey &p_key, const TValue &p_value) {
-
uint32_t hash = p_hash;
uint32_t distance = 0;
uint32_t pos = hash % capacity;
@@ -140,7 +138,6 @@ private:
}
void _resize_and_rehash(uint32_t p_new_capacity) {
-
uint32_t old_capacity = capacity;
capacity = p_new_capacity;
@@ -183,9 +180,7 @@ public:
}
void clear() {
-
for (uint32_t i = 0; i < capacity; i++) {
-
if (hashes[i] == EMPTY_HASH) {
continue;
}
@@ -199,7 +194,6 @@ public:
}
void insert(const TKey &p_key, const TValue &p_value) {
-
if (num_elements + 1 > 0.9 * capacity) {
_resize_and_rehash();
}
@@ -317,7 +311,6 @@ public:
}
Iterator next_iter(const Iterator &p_iter) const {
-
if (!p_iter.valid) {
return p_iter;
}
@@ -348,7 +341,6 @@ public:
OAHashMap &operator=(const OAHashMap &) = delete; // Same for assignment operator.
OAHashMap(uint32_t p_initial_capacity = 64) {
-
capacity = p_initial_capacity;
keys = memnew_arr(TKey, p_initial_capacity);
@@ -361,7 +353,6 @@ public:
}
~OAHashMap() {
-
memdelete_arr(keys);
memdelete_arr(values);
memdelete_arr(hashes);