mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-11-23 04:41:11 +00:00
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:
parent
a08bebc4b5
commit
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
|
||||
|
Loading…
Reference in New Issue
Block a user