MCPcopy Create free account
hub / github.com/CodingGay/BlackDex / IndexForHash

Method IndexForHash

Bcore/src/main/cpp/base/hash_set.h:539–545  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

537 }
538
539 size_t IndexForHash(size_t hash) const {
540 // Protect against undefined behavior (division by zero).
541 if (UNLIKELY(num_buckets_ == 0)) {
542 return 0;
543 }
544 return hash % num_buckets_;
545 }
546
547 size_t NextIndex(size_t index) const {
548 if (UNLIKELY(++index >= num_buckets_)) {

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected