Browse Source

nce: fix variable shadowing a member of std::hash

Signed-off-by: Marcin Serwin <marcin@serwin.dev>
pull/2591/head
Marcin Serwin 6 months ago
parent
commit
ffc0b99930
No known key found for this signature in database GPG Key ID: DACFAC4EA0B194E0
  1. 6
      src/core/arm/nce/patcher.h

6
src/core/arm/nce/patcher.h

@ -27,11 +27,11 @@ template <>
struct std::hash<PatchCacheKey> { struct std::hash<PatchCacheKey> {
size_t operator()(const PatchCacheKey& key) const { size_t operator()(const PatchCacheKey& key) const {
// Simple XOR hash of first few bytes // 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) { 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…
Cancel
Save