From 3af35fa610880bfd1f89a9cd72c51b53cde5bbd2 Mon Sep 17 00:00:00 2001 From: smallmodel <15067410+smallmodel@users.noreply.github.com> Date: Sat, 15 Feb 2025 00:48:07 +0100 Subject: [PATCH] Correctly parse the function name in ScriptDeprecatedAlt --- code/script/scriptexception.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/code/script/scriptexception.h b/code/script/scriptexception.h index 44a5ca0c..b48aa931 100644 --- a/code/script/scriptexception.h +++ b/code/script/scriptexception.h @@ -48,6 +48,6 @@ public: void Error(const char *format, ...); #define ScriptDeprecated(function) throw ScriptException(function ": DEPRECATED. DON'T USE IT ANYMORE") -#define ScriptDeprecatedAltMethod(alternative_name) gi.DPrintf("WARNING: " XSTRING(__FUNCTION__) ": is deprecated and has been superseded by the " alternative_name " method\n") -#define ScriptDeprecatedAltVariable(alternative_name) gi.DPrintf("WARNING: " XSTRING(__FUNCTION__) ": is deprecated and has been superseded by the " alternative_name " variable\n") +#define ScriptDeprecatedAltMethod(alternative_name) gi.DPrintf("WARNING: %s: is deprecated and has been superseded by the " alternative_name " method\n", __FUNCTION__) +#define ScriptDeprecatedAltVariable(alternative_name) gi.DPrintf("WARNING: %s: is deprecated and has been superseded by the " alternative_name " variable\n", __FUNCTION__) #define ScriptError throw ScriptException