Bug 1860451 - Add documentation for the hash inequality in HashPolicy::match. r=mgaudet DONTBUILD

Differential Revision: https://phabricator.services.mozilla.com/D191591
This commit is contained in:
Tooru Fujisawa 2023-10-31 20:41:17 +00:00
Родитель a08bebc4b5
Коммит 93738a7432
1 изменённых файлов: 6 добавлений и 1 удалений

Просмотреть файл

@ -732,7 +732,12 @@ class HashSet {
// - a static member function |HP::match| that tests equality of key and
// lookup values:
//
// static bool match(const Key&, const Lookup&);
// static bool match(const Key& aKey, const Lookup& aLookup);
//
// |aKey| and |aLookup| can have different hash numbers, only when a
// collision happens with |prepareHash| operation, which is less frequent.
// Thus, |HP::match| shouldn't assume the hash equality in the comparison,
// even if the hash numbers are almost always same between them.
//
// Normally, Lookup = Key. In general, though, different values and types of
// values can be used to lookup and store. If a Lookup value |l| is not equal