From db7a40cb30aa656b3a6a52ca337a8481035e2467 Mon Sep 17 00:00:00 2001 From: Redstone1024 <2824517378@qq.com> Date: Tue, 14 Jan 2025 22:21:18 +0800 Subject: [PATCH] fix(strings): fix unexpected infinite recursion in TChar --- Redcraft.Utility/Source/Public/Strings/Char.h | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/Redcraft.Utility/Source/Public/Strings/Char.h b/Redcraft.Utility/Source/Public/Strings/Char.h index b53e9f3..a2027f8 100644 --- a/Redcraft.Utility/Source/Public/Strings/Char.h +++ b/Redcraft.Utility/Source/Public/Strings/Char.h @@ -110,13 +110,13 @@ struct TChar // Windows uses UTF-16 encoding for wchar. else if constexpr (PLATFORM_WINDOWS && (CSameAs)) { - return TChar::IsValid(static_cast(InChar)); + return TChar::IsValid(static_cast(InChar)); } // Linux uses UTF-32 encoding for wchar. else if constexpr (PLATFORM_LINUX && (CSameAs)) { - return TChar::IsValid(static_cast(InChar)); + return TChar::IsValid(static_cast(InChar)); } else static_assert(sizeof(FCharType) == -1, "Unsupported character type"); @@ -153,13 +153,13 @@ struct TChar // Windows uses UTF-16 encoding for wchar. else if constexpr (PLATFORM_WINDOWS && (CSameAs)) { - return TChar::IsNonch(static_cast(InChar)); + return TChar::IsNonch(static_cast(InChar)); } // Linux uses UTF-32 encoding for wchar. else if constexpr (PLATFORM_LINUX && (CSameAs)) { - return TChar::IsNonch(static_cast(InChar)); + return TChar::IsNonch(static_cast(InChar)); } else static_assert(sizeof(FCharType) == -1, "Unsupported character type");