fix(CanApply): issue with selecting the correct datanode (#1533)

This commit is contained in:
Quentin 2023-06-25 23:04:01 +02:00 committed by GitHub
parent 1e701326a2
commit f8f63a789a
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 678 additions and 663 deletions

View File

@ -8,6 +8,25 @@
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)
{
joaat_t hash = 0;

File diff suppressed because it is too large Load Diff