refactor(*): make type alias identifiers conform to the style for general type identifiers

This commit is contained in:
2024-12-16 19:34:47 +08:00
parent d2b6e0c669
commit 312cfe4097
54 changed files with 1738 additions and 1698 deletions

View File

@ -19,10 +19,10 @@ struct TPointerTraits<T*>
{
static constexpr bool bIsPointer = true;
using PointerType = T*;
using ElementType = T;
using FPointerType = T*;
using FElementType = T;
static FORCEINLINE constexpr ElementType* ToAddress(PointerType InPtr)
static FORCEINLINE constexpr FElementType* ToAddress(FPointerType InPtr)
{
return InPtr;
}
@ -34,29 +34,29 @@ struct TPointerTraits<T(*)[]>
{
static constexpr bool bIsPointer = true;
using PointerType = T(*)[];
using ElementType = T;
using FPointerType = T(*)[];
using FElementType = T;
static FORCEINLINE constexpr ElementType* ToAddress(PointerType InPtr)
static FORCEINLINE constexpr FElementType* ToAddress(FPointerType InPtr)
{
return InPtr;
}
};
/** A specialization of TPointerTraits is provided for pointer-like type. */
#define DEFINE_TPointerTraits(TPtr) \
template <typename T> \
struct TPointerTraits<TPtr<T>> \
{ \
static constexpr bool bIsPointer = true; \
\
using PointerType = TPtr<T>; \
using ElementType = TPtr<T>::ElementType; \
\
static FORCEINLINE constexpr ElementType* ToAddress(const PointerType& InPtr) \
{ \
return InPtr.Get(); \
} \
#define DEFINE_TPointerTraits(TPtr) \
template <typename T> \
struct TPointerTraits<TPtr<T>> \
{ \
static constexpr bool bIsPointer = true; \
\
using FPointerType = TPtr<T>; \
using FElementType = TPtr<T>::FElementType; \
\
static FORCEINLINE constexpr FElementType* ToAddress(const FPointerType& InPtr) \
{ \
return InPtr.Get(); \
} \
};
NAMESPACE_MODULE_END(Utility)