Fix -Wuseless-cast in array_prefix_set::reseed

uintptr_t is already uint64_t on LP64 Linux, so the explicit cast is
useless there; rely on the implicit (widening) conversion instead.

Signed-off-by: Niels Lohmann <mail@nlohmann.me>
This commit is contained in:
Niels Lohmann committed 2026-11-11 22:23:20 +01:00
1 parent b3dd34036a
commit abc05301ab
2 files changed
+4 -2

No files matched your search

+2 -1
View File
@@ -27277,7 +27277,8 @@ class json_pointer
void reseed(const void* address) noexcept
{
// NOLINTNEXTLINE(cppcoreguidelines-pro-type-reinterpret-cast): the address is only a source of entropy
std::uint64_t x = static_cast<std::uint64_t>(reinterpret_cast<std::uintptr_t>(address)) ^ 0x9E3779B97F4A7C15ULL;
std::uint64_t x = reinterpret_cast<std::uintptr_t>(address);
x ^= 0x9E3779B97F4A7C15ULL;
x *= 0xBF58476D1CE4E5B9ULL;
seed = x ^ (x >> 31u);
tree.reseed(seed);