From 73b5305d3463bd525064876847579ad539f54208 Mon Sep 17 00:00:00 2001 From: _Redstone_c_ Date: Fri, 20 Jan 2023 23:33:30 +0800 Subject: [PATCH] fix(miscellaneous): fix LNK2005 errors of MSVC caused by GSignalDefault etc --- .../Source/Public/Miscellaneous/ProgramSupport.h | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/Redcraft.Utility/Source/Public/Miscellaneous/ProgramSupport.h b/Redcraft.Utility/Source/Public/Miscellaneous/ProgramSupport.h index 7f37732..68d6e24 100644 --- a/Redcraft.Utility/Source/Public/Miscellaneous/ProgramSupport.h +++ b/Redcraft.Utility/Source/Public/Miscellaneous/ProgramSupport.h @@ -34,9 +34,9 @@ enum class ESignalType : int ArithmeticException = SIGFPE, // Erroneous arithmetic operation such as divide by zero. }; -FSignalHandler* GSignalDefault = SIG_DFL; // Defines default signal handling strategies. -FSignalHandler* GSignalIgnored = SIG_IGN; // Defines Signal is ignored strategies. -FSignalHandler* GSignalError = SIG_ERR; // Return value of signal specifying that an error was encountered. +inline static FSignalHandler* GSignalDefault = SIG_DFL; // Defines default signal handling strategies. +inline static FSignalHandler* GSignalIgnored = SIG_IGN; // Defines Signal is ignored strategies. +inline static FSignalHandler* GSignalError = SIG_ERR; // Return value of signal specifying that an error was encountered. /** The integer type that can be accessed as an atomic entity from an asynchronous signal handler. */ using FSignalAtomic = NAMESPACE_STD::sig_atomic_t;