diff --git a/Include/AuroraUtils.hpp b/Include/AuroraUtils.hpp index 90a9997e..36cf883c 100644 --- a/Include/AuroraUtils.hpp +++ b/Include/AuroraUtils.hpp @@ -12,7 +12,7 @@ #endif template -static inline AuSPtr AuMakeShared(Args&&... args) +static auline AuSPtr AuMakeShared(Args&&... args) { try { @@ -29,13 +29,13 @@ static inline AuSPtr AuMakeShared(Args&&... args) #endif template -static inline auto AuMakePair(Args&&... args) +static auline auto AuMakePair(Args&&... args) { return AURORA_RUNTIME_MAKE_PAIR(std::forward(args)...); } #if defined(AURORA_IS_MODERNNT_DERIVED) && (defined(_WINDOWS_) || defined(_OTHER_MS_MAIN_HEADER_GUARDS_HERE)) -static inline void AuWin32CloseHandle(HANDLE &handle) +static auline void AuWin32CloseHandle(HANDLE &handle) { HANDLE local; @@ -67,10 +67,10 @@ static constexpr int AuArraySize(const T(&array)[Z]) #if defined(DEBUG) || defined(STAGING) template -static inline void __declspec(noreturn) SysPanic(T... args); +static auline void __declspec(noreturn) SysPanic(T... args); template -static void inline SafeDelete(T *in) +static void auline SafeDelete(T *in) { static_assert(std::is_base_of::type>::value, "Couldn't not safe delete from type T because it is not derived from Z"); auto cast = dynamic_cast(in); @@ -85,7 +85,7 @@ static void inline SafeDelete(T *in) #else template -static void inline SafeDelete(T *in) +static void auline SafeDelete(T *in) { static_assert(std::is_base_of::type>::value, "Couldn't not safe delete from type T because it is not derived from Z"); delete static_cast(in); @@ -106,7 +106,7 @@ struct AuNullCallback AU_DEFINE_CTOR_ONE(AuNullCallback, (AuVoidFunc, voidFunc)); AU_DEFINE_CTOR_ONE(AuNullCallback, (AuSPtr, callbackFunc)); - inline void operator()() + auline void operator()() { if (voidFunc) { @@ -119,7 +119,7 @@ struct AuNullCallback } }; -static constexpr inline AuUInt32 AuConvertMagicTag32(const char buffer[4]) +static constexpr auline AuUInt32 AuConvertMagicTag32(const char buffer[4]) { AuUInt32 magic {}; if (Aurora::Build::kCurrentEndian == Aurora::Build::ECPUEndian::eCPULittle) @@ -154,7 +154,7 @@ static constexpr inline AuUInt32 AuConvertMagicTag32(const char buffer[4]) return magic; } -static constexpr inline AuUInt64 AuConvertMagicTag64(const char buffer[8]) +static constexpr auline AuUInt64 AuConvertMagicTag64(const char buffer[8]) { AuUInt64 magic {}; if (Aurora::Build::kCurrentEndian == Aurora::Build::ECPUEndian::eCPULittle) @@ -183,32 +183,32 @@ static constexpr inline AuUInt64 AuConvertMagicTag64(const char buffer[8]) } template -static inline AuOptional> AuOptionalSharedDynamicCast(AuOptional> &in) +static auline AuOptional> AuOptionalSharedDynamicCast(AuOptional> &in) { if (!in.has_value()) return {}; return std::dynamic_pointer_cast(in.value()); } template -static inline AuOptional> AuOptionalSharedStaticCast(AuOptional> &in) +static auline AuOptional> AuOptionalSharedStaticCast(AuOptional> &in) { if (!in.has_value()) return {}; return std::static_pointer_cast(in.value()); } -static inline bool AuEndsWith(AuString const &value, AuString const &ending) +static auline bool AuEndsWith(AuString const &value, AuString const &ending) { if (ending.size() > value.size()) return false; return std::equal(ending.rbegin(), ending.rend(), value.rbegin()); } -static inline bool AuStartsWith(AuString const &value, AuString const &starting) +static auline bool AuStartsWith(AuString const &value, AuString const &starting) { return value.rfind(starting, 0) == 0; } template -static inline AuString AuToStringASCIIOp(T op, const AuString &in) +static auline AuString AuToStringASCIIOp(T op, const AuString &in) { AuString ret; ret.resize(in.size()); @@ -219,18 +219,18 @@ static inline AuString AuToStringASCIIOp(T op, const AuString &in) return ret; } -static inline AuString AuToLower(const AuString &in) +static auline AuString AuToLower(const AuString &in) { return AuToStringASCIIOp(std::tolower, in); } -static inline AuString AuToUpper(const AuString &in) +static auline AuString AuToUpper(const AuString &in) { return AuToStringASCIIOp(std::toupper, in); } template -static inline bool AuTryFind(Map &map, const Key &key, Value *&ptr) +static auline bool AuTryFind(Map &map, const Key &key, Value *&ptr) { auto itr = map.find(key); if (itr != map.end()) @@ -246,7 +246,7 @@ static inline bool AuTryFind(Map &map, const Key &key, Value *&ptr) } template -static inline bool AuTryFind(Map *map, const Key &key, Value *&ptr) +static auline bool AuTryFind(Map *map, const Key &key, Value *&ptr) { auto itr = map->find(key); if (itr != map->end()) @@ -262,7 +262,7 @@ static inline bool AuTryFind(Map *map, const Key &key, Value *&ptr) } template -static inline bool AuTryFind(Map &map, const Key &key) +static auline bool AuTryFind(Map &map, const Key &key) { auto itr = map.find(key); if (itr != map.end()) @@ -276,13 +276,13 @@ static inline bool AuTryFind(Map &map, const Key &key) } template -static inline bool AuExists(Range &a, const Key &item) +static auline bool AuExists(Range &a, const Key &item) { return std::find(a.begin(), a.end(), item) != a.end(); } template -static inline bool AuTryFind(Map *map, const Key &key) +static auline bool AuTryFind(Map *map, const Key &key) { auto itr = map->find(key); if (itr != map->end()) @@ -296,7 +296,7 @@ static inline bool AuTryFind(Map *map, const Key &key) } template -static inline bool AuTryFindGeneric(Map &map, const Key &key, Value *&ptr) +static auline bool AuTryFindGeneric(Map &map, const Key &key, Value *&ptr) { auto itr = map.find(key); if (itr != map.end()) @@ -312,7 +312,7 @@ static inline bool AuTryFindGeneric(Map &map, const Key &key, Value *&ptr) } template -static inline bool AuTryDelete(Map &map, const Key &key) +static auline bool AuTryDelete(Map &map, const Key &key) { auto itr = map.find(key); if (itr != map.end()) @@ -327,7 +327,7 @@ static inline bool AuTryDelete(Map &map, const Key &key) } template -static inline bool AuTryDeleteList(List &list, const Key &key) +static auline bool AuTryDeleteList(List &list, const Key &key) { auto itr = std::find(list.begin(), list.end(), key); if (itr != list.end()) @@ -342,7 +342,7 @@ static inline bool AuTryDeleteList(List &list, const Key &key) } template -static inline bool AuTryInsert(Container &container, const Type &value) +static auline bool AuTryInsert(Container &container, const Type &value) { try { @@ -356,7 +356,7 @@ static inline bool AuTryInsert(Container &container, const Type &value) } } template -static inline bool AuTryInsert(Container &container, Type &&value) +static auline bool AuTryInsert(Container &container, Type &&value) { try { @@ -371,7 +371,7 @@ static inline bool AuTryInsert(Container &container, Type &&value) } template -static inline bool AuTryInsert(Container *container, const Type &value) +static auline bool AuTryInsert(Container *container, const Type &value) { try { @@ -386,7 +386,7 @@ static inline bool AuTryInsert(Container *container, const Type &value) } template -static inline bool AuTryInsert(Container *container, Type &&value) +static auline bool AuTryInsert(Container *container, Type &&value) { try { @@ -401,7 +401,7 @@ static inline bool AuTryInsert(Container *container, Type &&value) } template -static inline bool AuTryInsertNoEnd(Container &container, Type &&value) // move +static auline bool AuTryInsertNoEnd(Container &container, Type &&value) // move { try { @@ -416,7 +416,7 @@ static inline bool AuTryInsertNoEnd(Container &container, Type &&value) // move } template -static inline bool AuTryInsertNoEnd(Container &container, const Type &value) // copy +static auline bool AuTryInsertNoEnd(Container &container, const Type &value) // copy { try { @@ -431,7 +431,7 @@ static inline bool AuTryInsertNoEnd(Container &container, const Type &value) // } template -static inline bool AuTryInsertNoEnd(Container *container, Type &&value) // move +static auline bool AuTryInsertNoEnd(Container *container, Type &&value) // move { try { @@ -446,7 +446,7 @@ static inline bool AuTryInsertNoEnd(Container *container, Type &&value) // move } template -static inline bool AuTryInsertNoEnd(Container *container, const Type &value) // copy +static auline bool AuTryInsertNoEnd(Container *container, const Type &value) // copy { try { @@ -466,7 +466,7 @@ namespace Aurora::Memory } template -static inline bool AuTryResize(T &list, AuUInt length) +static auline bool AuTryResize(T &list, AuUInt length) { try { @@ -487,7 +487,7 @@ static inline bool AuTryResize(T &list, AuUInt length) } template -static inline bool AuTryDownsize(T &list, AuUInt length) +static auline bool AuTryDownsize(T &list, AuUInt length) { try { @@ -508,7 +508,7 @@ static inline bool AuTryDownsize(T &list, AuUInt length) } } -static inline AuString AuReplaceAll(AuString &str, const AuString &from, const AuString &to) +static auline AuString AuReplaceAll(AuString &str, const AuString &from, const AuString &to) { size_t start_pos = 0; while ((start_pos = str.find(from, start_pos)) != std::string::npos) @@ -520,7 +520,7 @@ static inline AuString AuReplaceAll(AuString &str, const AuString &from, const A } // i told myself not to copy this, required a split function twice, now here we are :D -static inline AuList AuSplitString(const AuString& str, const AuString& delim, bool ignoreEmpty = true) +static auline AuList AuSplitString(const AuString& str, const AuString& delim, bool ignoreEmpty = true) { AuList tokens; AuUInt prev = 0, pos = 0; @@ -563,25 +563,77 @@ auto AuTuplePopFront(const Tuple& tuple) } template -static inline bool AuTestBit(T value, AuUInt8 idx) +static auline bool AuTestBit(T value, AuUInt8 idx) { return value & (T(1) << T(idx)); } template -static inline void AuSetBit(T &value, AuUInt8 idx) +static auline void AuSetBit(T &value, AuUInt8 idx) { value |= T(1) << T(idx); } template -static inline void AuClearBit(T &value, AuUInt8 idx) +static auline void AuClearBit(T &value, AuUInt8 idx) { value &= ~(T(1) << T(idx)); } +template +static auline bool AuBitScanForward(AuUInt8 &index, T value) +{ + unsigned long ret; + bool success; + + success = false; + index = 0; + + if (value == 0) + { + return false; + } + +#if defined(AURORA_COMPILER_MSVC) + if constexpr ( sizeof(T) == sizeof(AuUInt64)) + #if defined(AURORA_IS_32BIT) + if (!_BitScanForward(&ret, static_cast(value & 0xffffffff))) + { + _BitScanForward(&ret, static_cast((value << 32) & 0xffffffff)); + ret += 32; + } + #else + success = _BitScanForward64(&ret, static_cast(value)); + #endif + else success = _BitScanForward(&ret, static_cast(value)); +#elif defined(AURORA_COMPILER_GCC) || defined(AURORA_COMPILER_CLANG) + if constexpr (sizeof(T) == sizeof(AuUInt64)) + #if defined(AURORA_IS_32BIT) + auto lower = static_cast(value & 0xffffffff)); + if (lower == 0) + { + ret = __builtin_ctzl(static_cast((value << 32) & 0xffffffff)); + ret += 32; + } + else + { + ret = __builtin_ctzl(static_cast(lower)); + } + #else + ret = __builtin_ctzll(static_cast(value)); + #endif + else if constexpr (sizeof(T) == sizeof(unsigned long)) + ret = __builtin_ctzl(static_cast(value)); + else if constexpr ( sizeof(T) == sizeof(unsigned int)) + ret = __builtin_ctz(static_cast(value)); + success = true; +#endif + index = ret; + return success; +} + // TODO: AuPopCnt -// TODO: AuBitScanForward +// TODO: AuBitScanReverse #if defined(AURORA_ARCH_X64) || defined(AURORA_ARCH_X86) || defined(AURORA_ARCH_ARM) #define AURORA_PERMIT_ARBITRARY_REF @@ -591,7 +643,7 @@ static inline void AuClearBit(T &value, AuUInt8 idx) // I'm sorry to anyone reading this. I wanted it to be verbose. I should've just used my old friends, macros :( template -static inline T AuReadGenericLE(const void *ptr, int offset) +static auline T AuReadGenericLE(const void *ptr, int offset) { #if defined(AURORA_PERMIT_ARBITRARY_REF) && defined(AU_CPU_ENDIAN_LITTLE) return *reinterpret_cast(reinterpret_cast(ptr) + offset); @@ -632,7 +684,7 @@ static inline T AuReadGenericLE(const void *ptr, int offset) } template -static inline T AuReadGenericBE(const void *ptr, int offset) +static auline T AuReadGenericBE(const void *ptr, int offset) { #if defined(AURORA_PERMIT_ARBITRARY_REF) && defined(AU_CPU_ENDIAN_BIG) return *reinterpret_cast(reinterpret_cast(ptr) + offset); @@ -672,87 +724,87 @@ static inline T AuReadGenericBE(const void *ptr, int offset) #endif } -static inline AuUInt64 AuReadU64LE(const void *ptr, int offset) +static auline AuUInt64 AuReadU64LE(const void *ptr, int offset) { return AuReadGenericLE(ptr, offset); } -static inline AuUInt32 AuReadU32LE(const void *ptr, int offset) +static auline AuUInt32 AuReadU32LE(const void *ptr, int offset) { return AuReadGenericLE(ptr, offset); } -static inline AuUInt16 AuReadU16LE(const void *ptr, int offset) +static auline AuUInt16 AuReadU16LE(const void *ptr, int offset) { return AuReadGenericLE(ptr, offset); } -static inline AuUInt8 AuReadU8LE(const void *ptr, int offset) +static auline AuUInt8 AuReadU8LE(const void *ptr, int offset) { return AuReadGenericLE(ptr, offset); } -static inline AuInt64 AuReadS64LE(const void *ptr, int offset) +static auline AuInt64 AuReadS64LE(const void *ptr, int offset) { return AuReadGenericLE(ptr, offset); } -static inline AuInt32 AuReadS32LE(const void *ptr, int offset) +static auline AuInt32 AuReadS32LE(const void *ptr, int offset) { return AuReadGenericLE(ptr, offset); } -static inline AuInt16 AuReadS16LE(const void *ptr, int offset) +static auline AuInt16 AuReadS16LE(const void *ptr, int offset) { return AuReadGenericLE(ptr, offset); } -static inline AuInt8 AuReadS8LE(const void *ptr, int offset) +static auline AuInt8 AuReadS8LE(const void *ptr, int offset) { return AuReadGenericLE(ptr, offset); } -static inline AuUInt64 AuReadU64BE(const void *ptr, int offset) +static auline AuUInt64 AuReadU64BE(const void *ptr, int offset) { return AuReadGenericBE(ptr, offset); } -static inline AuUInt32 AuReadU32BE(const void *ptr, int offset) +static auline AuUInt32 AuReadU32BE(const void *ptr, int offset) { return AuReadGenericBE(ptr, offset); } -static inline AuUInt16 AuReadU16BE(const void *ptr, int offset) +static auline AuUInt16 AuReadU16BE(const void *ptr, int offset) { return AuReadGenericBE(ptr, offset); } -static inline AuUInt8 AuReadU8BE(const void *ptr, int offset) +static auline AuUInt8 AuReadU8BE(const void *ptr, int offset) { return AuReadGenericBE(ptr, offset); } -static inline AuInt64 AuReadS64BE(const void *ptr, int offset) +static auline AuInt64 AuReadS64BE(const void *ptr, int offset) { return AuReadGenericBE(ptr, offset); } -static inline AuInt32 AuReadS32BE(const void *ptr, int offset) +static auline AuInt32 AuReadS32BE(const void *ptr, int offset) { return AuReadGenericBE(ptr, offset); } -static inline AuInt16 AuReadS16BE(const void *ptr, int offset) +static auline AuInt16 AuReadS16BE(const void *ptr, int offset) { return AuReadGenericBE(ptr, offset); } -static inline AuInt8 AuReadS8BE(const void *ptr, int offset) +static auline AuInt8 AuReadS8BE(const void *ptr, int offset) { return AuReadGenericBE(ptr, offset); } -static inline AuUInt64 AuReadU64(const void *ptr, int offset) +static auline AuUInt64 AuReadU64(const void *ptr, int offset) { #if defined(AU_CPU_ENDIAN_LITTLE) return AuReadU64LE(ptr, offset); @@ -761,7 +813,7 @@ static inline AuUInt64 AuReadU64(const void *ptr, int offset) #endif } -static inline AuUInt32 AuReadU32(const void *ptr, int offset) +static auline AuUInt32 AuReadU32(const void *ptr, int offset) { #if defined(AU_CPU_ENDIAN_LITTLE) return AuReadU32LE(ptr, offset); @@ -770,7 +822,7 @@ static inline AuUInt32 AuReadU32(const void *ptr, int offset) #endif } -static inline AuUInt16 AuReadU16(const void *ptr, int offset) +static auline AuUInt16 AuReadU16(const void *ptr, int offset) { #if defined(AU_CPU_ENDIAN_LITTLE) return AuReadU16LE(ptr, offset); @@ -779,7 +831,7 @@ static inline AuUInt16 AuReadU16(const void *ptr, int offset) #endif } -static inline AuUInt8 AuReadU8(const void *ptr, int offset) +static auline AuUInt8 AuReadU8(const void *ptr, int offset) { #if defined(AU_CPU_ENDIAN_LITTLE) return AuReadU8LE(ptr, offset); @@ -788,7 +840,7 @@ static inline AuUInt8 AuReadU8(const void *ptr, int offset) #endif } -static inline AuInt64 AuReadS64(const void *ptr, int offset) +static auline AuInt64 AuReadS64(const void *ptr, int offset) { #if defined(AU_CPU_ENDIAN_LITTLE) return AuReadS64LE(ptr, offset); @@ -797,7 +849,7 @@ static inline AuInt64 AuReadS64(const void *ptr, int offset) #endif } -static inline AuInt32 AuReadS32(const void *ptr, int offset) +static auline AuInt32 AuReadS32(const void *ptr, int offset) { #if defined(AU_CPU_ENDIAN_LITTLE) return AuReadS32LE(ptr, offset); @@ -806,7 +858,7 @@ static inline AuInt32 AuReadS32(const void *ptr, int offset) #endif } -static inline AuInt16 AuReadS16(const void *ptr, int offset) +static auline AuInt16 AuReadS16(const void *ptr, int offset) { #if defined(AU_CPU_ENDIAN_LITTLE) return AuReadS16LE(ptr, offset); @@ -815,7 +867,7 @@ static inline AuInt16 AuReadS16(const void *ptr, int offset) #endif } -static inline AuInt8 AuReadS8(const void *ptr, int offset) +static auline AuInt8 AuReadS8(const void *ptr, int offset) { #if defined(AU_CPU_ENDIAN_LITTLE) return AuReadS8LE(ptr, offset); @@ -825,7 +877,7 @@ static inline AuInt8 AuReadS8(const void *ptr, int offset) } template -static inline void AuWriteGenericLE(void *ptr, int offset, T value) +static auline void AuWriteGenericLE(void *ptr, int offset, T value) { #if defined(AURORA_PERMIT_ARBITRARY_REF) && defined(AU_CPU_ENDIAN_LITTLE) *reinterpret_cast(reinterpret_cast(ptr) + offset) = value; @@ -865,7 +917,7 @@ static inline void AuWriteGenericLE(void *ptr, int offset, T value) } template -static inline void AuWriteGenericBE(void *ptr, T value, int offset) +static auline void AuWriteGenericBE(void *ptr, T value, int offset) { #if defined(AURORA_PERMIT_ARBITRARY_REF) && defined(AU_CPU_ENDIAN_BIG) *reinterpret_cast(reinterpret_cast(ptr) + offset) = value; @@ -904,87 +956,87 @@ static inline void AuWriteGenericBE(void *ptr, T value, int offset) #endif } -static inline void AuWriteU64LE(void *ptr, int offset, AuUInt64 value) +static auline void AuWriteU64LE(void *ptr, int offset, AuUInt64 value) { AuWriteGenericLE(ptr, offset, value); } -static inline void AuWriteU32LE(void *ptr, int offset, AuUInt32 value) +static auline void AuWriteU32LE(void *ptr, int offset, AuUInt32 value) { AuWriteGenericLE(ptr, offset, value); } -static inline void AuWriteU16LE(void *ptr, int offset, AuUInt16 value) +static auline void AuWriteU16LE(void *ptr, int offset, AuUInt16 value) { AuWriteGenericLE(ptr, offset, value); } -static inline void AuWriteU8LE(void *ptr, int offset, AuUInt8 value) +static auline void AuWriteU8LE(void *ptr, int offset, AuUInt8 value) { AuWriteGenericLE(ptr, offset, value); } -static inline void AuWriteS64LE(void *ptr, int offset, AuInt64 value) +static auline void AuWriteS64LE(void *ptr, int offset, AuInt64 value) { AuWriteGenericLE(ptr, offset, value); } -static inline void AuWriteS32LE(void *ptr, int offset, AuInt32 value) +static auline void AuWriteS32LE(void *ptr, int offset, AuInt32 value) { AuWriteGenericLE(ptr, offset, value); } -static inline void AuWriteS16LE(void *ptr, int offset, AuInt16 value) +static auline void AuWriteS16LE(void *ptr, int offset, AuInt16 value) { AuWriteGenericLE(ptr, offset, value); } -static inline void AuWriteS8LE(void *ptr, int offset, AuInt8 value) +static auline void AuWriteS8LE(void *ptr, int offset, AuInt8 value) { AuWriteGenericLE(ptr, offset, value); } -static inline void AuWriteU64BE(void *ptr, int offset, AuUInt64 value) +static auline void AuWriteU64BE(void *ptr, int offset, AuUInt64 value) { AuWriteGenericBE(ptr, offset, value); } -static inline void AuWriteU32BE(void *ptr, int offset, AuUInt32 value) +static auline void AuWriteU32BE(void *ptr, int offset, AuUInt32 value) { AuWriteGenericBE(ptr, offset, value); } -static inline void AuWriteU16BE(void *ptr, int offset, AuUInt16 value) +static auline void AuWriteU16BE(void *ptr, int offset, AuUInt16 value) { AuWriteGenericBE(ptr, offset, value); } -static inline void AuWriteU8BE(void *ptr, int offset, AuUInt8 value) +static auline void AuWriteU8BE(void *ptr, int offset, AuUInt8 value) { AuWriteGenericBE(ptr, offset, value); } -static inline void AuWriteS64BE(void *ptr, int offset, AuInt64 value) +static auline void AuWriteS64BE(void *ptr, int offset, AuInt64 value) { AuWriteGenericBE(ptr, offset, value); } -static inline void AuWriteS32BE(void *ptr, int offset, AuInt32 value) +static auline void AuWriteS32BE(void *ptr, int offset, AuInt32 value) { AuWriteGenericBE(ptr, offset, value); } -static inline void AuWriteS16BE(void *ptr, int offset, AuInt16 value) +static auline void AuWriteS16BE(void *ptr, int offset, AuInt16 value) { AuWriteGenericBE(ptr, offset, value); } -static inline void AuWriteS8BE(void *ptr, int offset, AuInt8 value) +static auline void AuWriteS8BE(void *ptr, int offset, AuInt8 value) { AuWriteGenericBE(ptr, offset, value); } -static inline void AuWriteU64(void *ptr, int offset, AuUInt64 value) +static auline void AuWriteU64(void *ptr, int offset, AuUInt64 value) { #if defined(AU_CPU_ENDIAN_LITTLE) AuWriteU64LE(ptr, offset, value); @@ -993,7 +1045,7 @@ static inline void AuWriteU64(void *ptr, int offset, AuUInt64 value) #endif } -static inline void AuWriteU32(void *ptr, int offset, AuUInt32 value) +static auline void AuWriteU32(void *ptr, int offset, AuUInt32 value) { #if defined(AU_CPU_ENDIAN_LITTLE) AuWriteU32LE(ptr, offset, value); @@ -1002,7 +1054,7 @@ static inline void AuWriteU32(void *ptr, int offset, AuUInt32 value) #endif } -static inline void AuWriteU16(void *ptr, int offset, AuUInt16 value) +static auline void AuWriteU16(void *ptr, int offset, AuUInt16 value) { #if defined(AU_CPU_ENDIAN_LITTLE) AuWriteU16LE(ptr, offset, value); @@ -1011,7 +1063,7 @@ static inline void AuWriteU16(void *ptr, int offset, AuUInt16 value) #endif } -static inline void AuWriteU8(void *ptr, int offset, AuUInt8 value) +static auline void AuWriteU8(void *ptr, int offset, AuUInt8 value) { #if defined(AU_CPU_ENDIAN_LITTLE) AuWriteU8LE(ptr, offset, value); @@ -1020,7 +1072,7 @@ static inline void AuWriteU8(void *ptr, int offset, AuUInt8 value) #endif } -static inline void AuWriteS64(void *ptr, int offset, AuInt64 value) +static auline void AuWriteS64(void *ptr, int offset, AuInt64 value) { #if defined(AU_CPU_ENDIAN_LITTLE) AuWriteS64LE(ptr, offset, value); @@ -1029,7 +1081,7 @@ static inline void AuWriteS64(void *ptr, int offset, AuInt64 value) #endif } -static inline void AuWriteS32(void *ptr, int offset, AuInt32 value) +static auline void AuWriteS32(void *ptr, int offset, AuInt32 value) { #if defined(AU_CPU_ENDIAN_LITTLE) AuWriteS32LE(ptr, offset, value); @@ -1038,7 +1090,7 @@ static inline void AuWriteS32(void *ptr, int offset, AuInt32 value) #endif } -static inline void AuWriteS16(void *ptr, int offset, AuInt16 value) +static auline void AuWriteS16(void *ptr, int offset, AuInt16 value) { #if defined(AU_CPU_ENDIAN_LITTLE) AuWriteS16LE(ptr, offset, value); @@ -1047,7 +1099,7 @@ static inline void AuWriteS16(void *ptr, int offset, AuInt16 value) #endif } -static inline void AuWriteS8(void *ptr, int offset, AuInt8 value) +static auline void AuWriteS8(void *ptr, int offset, AuInt8 value) { #if defined(AU_CPU_ENDIAN_LITTLE) AuWriteS8LE(ptr, offset, value);