Changeset 244489 in webkit


Ignore:
Timestamp:
Apr 20, 2019 12:16:22 PM (5 years ago)
Author:
rniwa@webkit.org
Message:

HashTable::removeIf always shrinks the hash table by half even if there is nothing left
https://bugs.webkit.org/show_bug.cgi?id=196681
<rdar://problem/49917764>

Reviewed by Darin Adler.

Address Darin's comments by removing the explicit type from std::max.

  • wtf/HashTable.h:

(WTF::KeyTraits>::computeBestTableSize):
(WTF::KeyTraits>::shrinkToBestSize):

Location:
trunk/Source/WTF
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/Source/WTF/ChangeLog

    r244441 r244489  
     12019-04-19  Ryosuke Niwa  <rniwa@webkit.org>
     2
     3        HashTable::removeIf always shrinks the hash table by half even if there is nothing left
     4        https://bugs.webkit.org/show_bug.cgi?id=196681
     5        <rdar://problem/49917764>
     6
     7        Reviewed by Darin Adler.
     8
     9        Address Darin's comments by removing the explicit type from std::max.
     10
     11        * wtf/HashTable.h:
     12        (WTF::KeyTraits>::computeBestTableSize):
     13        (WTF::KeyTraits>::shrinkToBestSize):
     14
    1152019-04-18  Chris Dumez  <cdumez@apple.com>
    216
  • trunk/Source/WTF/wtf/HashTable.h

    r244289 r244489  
    12111211
    12121212        unsigned minimumTableSize = KeyTraits::minimumTableSize;
    1213         return std::max<unsigned>(bestTableSize, minimumTableSize);
     1213        return std::max(bestTableSize, minimumTableSize);
    12141214    }
    12151215
     
    12181218    {
    12191219        unsigned minimumTableSize = KeyTraits::minimumTableSize;
    1220         rehash(std::max<unsigned>(minimumTableSize, computeBestTableSize(m_keyCount)), nullptr);
     1220        rehash(std::max(minimumTableSize, computeBestTableSize(m_keyCount)), nullptr);
    12211221    }
    12221222
Note: See TracChangeset for help on using the changeset viewer.