refactor(templates): remove unnecessary or harmful FORCEINLINE

This commit is contained in:
2022-12-16 23:23:05 +08:00
parent b6c76ceadc
commit 6cee8a1185
4 changed files with 26 additions and 26 deletions

View File

@ -103,7 +103,7 @@ public:
FORCEINLINE constexpr TFunctionStorage() = default;
FORCEINLINE TFunctionStorage(const TFunctionStorage& InValue) requires (!bIsUnique)
TFunctionStorage(const TFunctionStorage& InValue) requires (!bIsUnique)
: RTTI(InValue.RTTI)
{
if (!IsValid()) return;
@ -128,7 +128,7 @@ public:
}
}
FORCEINLINE TFunctionStorage(TFunctionStorage&& InValue)
TFunctionStorage(TFunctionStorage&& InValue)
: RTTI(InValue.RTTI)
{
if (!IsValid()) return;
@ -158,7 +158,7 @@ public:
Destroy();
}
FORCEINLINE TFunctionStorage& operator=(const TFunctionStorage& InValue) requires (!bIsUnique)
TFunctionStorage& operator=(const TFunctionStorage& InValue) requires (!bIsUnique)
{
if (&InValue == this) return *this;
@ -195,7 +195,7 @@ public:
return *this;
}
FORCEINLINE TFunctionStorage& operator=(TFunctionStorage&& InValue)
TFunctionStorage& operator=(TFunctionStorage&& InValue)
{
if (&InValue == this) return *this;
@ -238,7 +238,7 @@ public:
FORCEINLINE constexpr bool IsValid() const { return RTTI != 0; }
// Use Invalidate() to invalidate the storage or use Emplace<T>() to emplace a new object after destruction.
FORCEINLINE void Destroy()
void Destroy()
{
if (!IsValid()) return;
@ -263,7 +263,7 @@ public:
// Make sure you call this function after you have destroyed the held object using Destroy().
template <typename T, typename... Ts>
FORCEINLINE void Emplace(uintptr InCallable, Ts&&... Args)
void Emplace(uintptr InCallable, Ts&&... Args)
{
Callable = InCallable;
@ -295,7 +295,7 @@ public:
}
FORCEINLINE void Swap(TFunctionStorage& InValue)
void Swap(TFunctionStorage& InValue)
{
if (!IsValid() && !InValue.IsValid()) return;