diff --git a/Include/auROXTL/auFNV1Utils.hpp b/Include/auROXTL/auFNV1Utils.hpp index 474d9a8..48a3707 100644 --- a/Include/auROXTL/auFNV1Utils.hpp +++ b/Include/auROXTL/auFNV1Utils.hpp @@ -52,11 +52,22 @@ inline constexpr AuUInt AuFnv1aType(const T &type, const AuUInt value = kFnv1Mag return AuFnv1aType(((const char *)&type) + 1, sizeof(T), 1, (value ^ AuUInt(*(const char *)&type) * kFnv1MagicPrimePlatform)); } +template +inline constexpr AuUInt AuFnv1aPtr(const T *const type, AuUInt length, const AuUInt value = kFnv1MagicValPlatform) noexcept +{ + return AuFnv1aType(((const char *)type) + 1, length, 1, (value ^ AuUInt(*(const char *)type) * kFnv1MagicPrimePlatform)); +} + inline constexpr auto AuFnv1a(const char *const str) noexcept { return _AU_FNV1_32 ? AuFnv1a32(str) : AuFnv1a64(str); } +inline constexpr auto AuFnv1a(const char *const str, AuUInt length) noexcept +{ + return AuFnv1aPtr(str, length); +} + inline AuUInt32 AuFnv1a32Runtime(const void *base, AuUInt length) noexcept { AuUInt32 result {kFnv1MagicVal32};