diff --git a/Redcraft.Utility/Source/Public/Memory/Alignment.h b/Redcraft.Utility/Source/Public/Memory/Alignment.h index 170058a..b0eb0b1 100644 --- a/Redcraft.Utility/Source/Public/Memory/Alignment.h +++ b/Redcraft.Utility/Source/Public/Memory/Alignment.h @@ -12,25 +12,25 @@ NAMESPACE_BEGIN(Memory) template requires TIsIntegral::Value || TIsPointer::Value FORCEINLINE constexpr T Align(T InValue, size_t Alignment) { - return (T)(((uintptr)(InValue) + static_cast(Alignment) - 1) & ~(static_cast(Alignment) - 1)); + return (T)(((uint64)(InValue) + static_cast(Alignment) - 1) & ~(static_cast(Alignment) - 1)); } template requires TIsIntegral::Value || TIsPointer::Value FORCEINLINE constexpr T AlignDown(T InValue, size_t Alignment) { - return (T)((uintptr)(InValue) & ~(static_cast(Alignment) - 1)); + return (T)((uint64)(InValue) & ~(static_cast(Alignment) - 1)); } template requires TIsIntegral::Value || TIsPointer::Value FORCEINLINE constexpr T AlignArbitrary(T InValue, size_t Alignment) { - return (T)((((uintptr)(InValue) + static_cast(Alignment) - 1) / static_cast(Alignment)) * static_cast(Alignment)); + return (T)((((uint64)(InValue) + static_cast(Alignment) - 1) / static_cast(Alignment)) * static_cast(Alignment)); } template requires TIsIntegral::Value || TIsPointer::Value FORCEINLINE constexpr bool IsAligned(T InValue, size_t Alignment) { - return !((uintptr)(InValue) & (static_cast(Alignment) - 1)); + return !((uint64)(InValue) & (static_cast(Alignment) - 1)); } NAMESPACE_END(Memory)