AAAAAHHH THE POSTERS ANDY

This commit is contained in:
Reece Wilson 2022-03-24 09:01:42 +00:00
parent 45b935d0e0
commit ecced7e44d
2 changed files with 13 additions and 7 deletions

View File

@ -56,7 +56,7 @@ namespace AuHash
#define _HASH_F_CPP(type) \
template<> struct hash<type> \
{ \
AuUInt operator ()(type b) const \
constexpr AuUInt operator ()(const type b) const \
{ \
return AuFnv1aType<type>(b); \
} \

View File

@ -23,9 +23,12 @@ static auline T AuReadGenericLE(const void *ptr, int offset)
AuMemcpy(&temp, reinterpret_cast<const AuUInt8 *>(ptr) + offset, sizeof(temp));
#endif
#if !defined(AU_CPU_ENDIAN_LITTLE)
temp = AuFlipEndian(temp);
#endif
if constexpr (sizeof(T) != 1)
{
#if !defined(AU_CPU_ENDIAN_LITTLE)
temp = AuFlipEndian(temp);
#endif
}
return temp;
}
@ -40,9 +43,12 @@ static auline T AuReadGenericBE(const void *ptr, int offset)
AuMemcpy(&temp, reinterpret_cast<const AuUInt8 *>(ptr) + offset, sizeof(temp));
#endif
#if defined(AU_CPU_ENDIAN_LITTLE)
temp = AuFlipEndian(temp);
#endif
if constexpr (sizeof(T) != 1)
{
#if defined(AU_CPU_ENDIAN_LITTLE)
temp = AuFlipEndian(temp);
#endif
}
return temp;
}