refactor(miscellaneous): renamed builtin type, add fixed-width character type
This commit is contained in:
@ -14,7 +14,7 @@ FORCEINLINE constexpr T Align(T InValue, size_t Alignment)
|
||||
{
|
||||
static_assert(TIsIntegral<T>::Value || TIsPointer<T>::Value, "Align expects an integer or pointer type");
|
||||
|
||||
return (T)(((uintptr_t)(InValue) + static_cast<uintptr_t>(Alignment) - 1) & ~(static_cast<uintptr_t>(Alignment) - 1));
|
||||
return (T)(((uintptr)(InValue) + static_cast<uintptr>(Alignment) - 1) & ~(static_cast<uintptr>(Alignment) - 1));
|
||||
}
|
||||
|
||||
template <typename T>
|
||||
@ -22,7 +22,7 @@ FORCEINLINE constexpr T AlignDown(T InValue, size_t Alignment)
|
||||
{
|
||||
static_assert(TIsIntegral<T>::Value || TIsPointer<T>::Value, "AlignDown expects an integer or pointer type");
|
||||
|
||||
return (T)((uintptr_t)(InValue) & ~(static_cast<uintptr_t>(Alignment) - 1));
|
||||
return (T)((uintptr)(InValue) & ~(static_cast<uintptr>(Alignment) - 1));
|
||||
}
|
||||
|
||||
template <typename T>
|
||||
@ -30,7 +30,7 @@ FORCEINLINE constexpr T AlignArbitrary(T InValue, size_t Alignment)
|
||||
{
|
||||
static_assert(TIsIntegral<T>::Value || TIsPointer<T>::Value, "AlignArbitrary expects an integer or pointer type");
|
||||
|
||||
return (T)((((uintptr_t)(InValue) + static_cast<uintptr_t>(Alignment) - 1) / static_cast<uintptr_t>(Alignment)) * static_cast<uintptr_t>(Alignment));
|
||||
return (T)((((uintptr)(InValue) + static_cast<uintptr>(Alignment) - 1) / static_cast<uintptr>(Alignment)) * static_cast<uintptr>(Alignment));
|
||||
}
|
||||
|
||||
template <typename T>
|
||||
@ -38,7 +38,7 @@ FORCEINLINE constexpr bool IsAligned(T InValue, size_t Alignment)
|
||||
{
|
||||
static_assert(TIsIntegral<T>::Value || TIsPointer<T>::Value, "IsAligned expects an integer or pointer type");
|
||||
|
||||
return !((uintptr_t)(InValue) & (static_cast<uintptr_t>(Alignment) - 1));
|
||||
return !((uintptr)(InValue) & (static_cast<uintptr>(Alignment) - 1));
|
||||
}
|
||||
|
||||
NAMESPACE_END(Memory)
|
||||
|
Reference in New Issue
Block a user