зеркало из https://github.com/mozilla/gecko-dev.git
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:
Родитель
a08bebc4b5
Коммит
93738a7432
|
@ -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
|
||||
|
|
Загрузка…
Ссылка в новой задаче