mirror of
https://github.com/Mr-X-GTA/YimMenu.git
synced 2025-06-18 07:07:32 +08:00
fix(CanApply): issue with selecting the correct datanode (#1533)
This commit is contained in:
parent
c258ee2022
commit
a5b2c28c3b
@ -8,6 +8,25 @@
|
|||||||
|
|
||||||
namespace rage
|
namespace rage
|
||||||
{
|
{
|
||||||
|
template<size_t N>
|
||||||
|
inline constexpr joaat_t consteval_joaat(char const (&data)[N])
|
||||||
|
{
|
||||||
|
joaat_t hash = 0;
|
||||||
|
|
||||||
|
for (std::size_t i = 0; i < N - 1; ++i)
|
||||||
|
{
|
||||||
|
hash += joaat_to_lower(data[i]);
|
||||||
|
hash += (hash << 10);
|
||||||
|
hash ^= (hash >> 6);
|
||||||
|
}
|
||||||
|
|
||||||
|
hash += (hash << 3);
|
||||||
|
hash ^= (hash >> 11);
|
||||||
|
hash += (hash << 15);
|
||||||
|
|
||||||
|
return hash;
|
||||||
|
}
|
||||||
|
|
||||||
inline consteval joaat_t consteval_joaat(const std::span<const char>& data)
|
inline consteval joaat_t consteval_joaat(const std::span<const char>& data)
|
||||||
{
|
{
|
||||||
joaat_t hash = 0;
|
joaat_t hash = 0;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user