فهرست منبع

Fixed case of InsertNew being used to set the first value in the map.

Matt Benic 10 سال پیش
والد
کامیت
3a06bc65b6
1فایلهای تغییر یافته به همراه6 افزوده شده و 3 حذف شده
  1. 6 3
      Source/Atomic/Container/HashMap.h

+ 6 - 3
Source/Atomic/Container/HashMap.h

@@ -364,9 +364,12 @@ public:
     Iterator InsertNew(const T& key, const U& value)
     {
         unsigned hashKey = Hash(key);
-        Node* node = FindNode(key, hashKey);
-        if (node)
-            return Iterator(node);
+        if (ptrs_) 
+        {
+            Node* node = FindNode(key, hashKey);
+            if (node)
+                return Iterator(node);
+        }
 
         return InsertNode(key, value, false);
     }