nce: fix variable shadowing a member of std::hash
All checks were successful
eden-license / license-header (pull_request) Successful in 23s
All checks were successful
eden-license / license-header (pull_request) Successful in 23s
Signed-off-by: Marcin Serwin <marcin@serwin.dev>
This commit is contained in:
parent
2a92e4b572
commit
ffc0b99930
1 changed files with 3 additions and 3 deletions
|
@ -27,11 +27,11 @@ template <>
|
|||
struct std::hash<PatchCacheKey> {
|
||||
size_t operator()(const PatchCacheKey& key) const {
|
||||
// Simple XOR hash of first few bytes
|
||||
size_t hash = 0;
|
||||
size_t hash_ = 0;
|
||||
for (size_t i = 0; i < key.module_id.size(); ++i) {
|
||||
hash ^= static_cast<size_t>(key.module_id[i]) << ((i % sizeof(size_t)) * 8);
|
||||
hash_ ^= static_cast<size_t>(key.module_id[i]) << ((i % sizeof(size_t)) * 8);
|
||||
}
|
||||
return hash ^ std::hash<uintptr_t>{}(key.offset);
|
||||
return hash_ ^ std::hash<uintptr_t>{}(key.offset);
|
||||
}
|
||||
};
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue