HashTable::removeIf always shrinks the hash table by half even if there is nothing...
[WebKit-https.git] / Source / WTF / wtf / HashTable.h
index daa84e6..2281d1f 100644 (file)
@@ -1210,14 +1210,14 @@ namespace WTF {
             bestTableSize *= 2;
 
         unsigned minimumTableSize = KeyTraits::minimumTableSize;
-        return std::max<unsigned>(bestTableSize, minimumTableSize);
+        return std::max(bestTableSize, minimumTableSize);
     }
 
     template<typename Key, typename Value, typename Extractor, typename HashFunctions, typename Traits, typename KeyTraits>
     void HashTable<Key, Value, Extractor, HashFunctions, Traits, KeyTraits>::shrinkToBestSize()
     {
         unsigned minimumTableSize = KeyTraits::minimumTableSize;
-        rehash(std::max<unsigned>(minimumTableSize, computeBestTableSize(m_keyCount)), nullptr);
+        rehash(std::max(minimumTableSize, computeBestTableSize(m_keyCount)), nullptr);
     }
 
     template<typename Key, typename Value, typename Extractor, typename HashFunctions, typename Traits, typename KeyTraits>