From 5e63266d9140287eb64a5a9ede18d047ae0abd2c Mon Sep 17 00:00:00 2001 From: ragnarok-clanker Date: Wed, 4 Nov 2026 20:03:25 +0000 Subject: [PATCH] Decompile fn_11892 (FrameTextHash::operator()) Batch #11094 by cremane: 1 byte-identical, 0 confirmed by peer review. - fn_11892 FrameTextHash::operator(): byte-identical Merged automatically: every function is byte-identical to the original. --- Source/UI/Window/FrameTextCache.cpp | 24 +++--------------------- 1 file changed, 3 insertions(+), 21 deletions(-) diff --git a/Source/UI/Window/FrameTextCache.cpp b/Source/UI/Window/FrameTextCache.cpp index 206d39a9..2a558bd7 100644 --- a/Source/UI/Window/FrameTextCache.cpp +++ b/Source/UI/Window/FrameTextCache.cpp @@ -1,29 +1,11 @@ #include "UI/Window/FrameTextCache.h" -namespace { - // INLINED - std::uint32_t HashWord(std::uint32_t value) { - std::uint32_t hash = 0x811C9DC5u; - - for (unsigned shift = 0; shift < 32; shift += 8) { - hash = 16777619u * (hash ^ ((value >> shift) & 255)); - } - - return hash; - } -} - // OFFSET: 0x008C4CF0 // FUNCTION: fn_11892 std::size_t FrameTextHash::operator()(const FrameTextKey& key) const { - std::uint32_t hash = 0x811C9DC5u; - - for (unsigned char value : key.text) { - hash = 16777619u * (hash ^ value); - } - - hash ^= HashWord(key.word1) + 0x9E3779B9u + (hash << 6) + (hash >> 2); - hash ^= HashWord(key.word0) + 0x9E3779B9u + (hash << 6) + (hash >> 2); + std::size_t hash = std::hash()(key.text); + hash ^= std::hash()(key.word1) + 0x9E3779B9u + (hash << 6) + (hash >> 2); + hash ^= std::hash()(key.word0) + 0x9E3779B9u + (hash << 6) + (hash >> 2); return hash; }