Fix V3Hash MacOS ambiguity again (#6350)

This commit is contained in:
Lan Zongwei 2025-08-31 21:54:13 +08:00 committed by GitHub
parent 4eb030717a
commit 2aa260a03b
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
3 changed files with 6 additions and 5 deletions

View File

@ -38,8 +38,8 @@ Chykon
Congcong Cai Congcong Cai
Conor McCullough Conor McCullough
Dan Petrisko Dan Petrisko
Danny Oler
Daniel Bates Daniel Bates
Danny Oler
Dave Sargeant Dave Sargeant
David Horton David Horton
David Ledger David Ledger
@ -144,6 +144,7 @@ Krzysztof Obłonczek
Krzysztof Starecki Krzysztof Starecki
Krzysztof Sychla Krzysztof Sychla
Kuba Ober Kuba Ober
Lan Zongwei
Larry Doolittle Larry Doolittle
Liam Braun Liam Braun
Luca Colagrande Luca Colagrande

View File

@ -46,8 +46,8 @@ public:
: V3Hash{static_cast<uint32_t>(val)} {} : V3Hash{static_cast<uint32_t>(val)} {}
explicit V3Hash(int64_t val) explicit V3Hash(int64_t val)
: V3Hash{static_cast<uint64_t>(val)} {} : V3Hash{static_cast<uint64_t>(val)} {}
explicit V3Hash(void* val) explicit V3Hash(const void* val)
: V3Hash{reinterpret_cast<uintptr_t>(val)} {} : V3Hash{static_cast<uint64_t>(reinterpret_cast<uintptr_t>(val))} {}
// METHODS // METHODS
uint32_t value() const VL_MT_SAFE { return m_value; } uint32_t value() const VL_MT_SAFE { return m_value; }

View File

@ -111,8 +111,8 @@ class OrderMoveDomScope final {
struct Hash final { struct Hash final {
size_t operator()(const DomScopeMapKey& key) const { size_t operator()(const DomScopeMapKey& key) const {
// cppcheck-suppress unreadVariable // cppcheck bug // cppcheck-suppress unreadVariable // cppcheck bug
V3Hash hash{reinterpret_cast<uint64_t>(key.m_domainp)}; V3Hash hash{key.m_domainp};
hash += reinterpret_cast<uint64_t>(key.m_scopep); hash += key.m_scopep;
return hash.value(); return hash.value();
} }
}; };