From e7cfda5c7739f4dde1923c578ace7921c7afa079 Mon Sep 17 00:00:00 2001 From: jonpas Date: Thu, 4 Jun 2015 22:46:06 +0200 Subject: [PATCH] Added Macro Guard to string macros --- addons/main/script_macros.hpp | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/addons/main/script_macros.hpp b/addons/main/script_macros.hpp index e51d4450a4..1fb4a0b622 100644 --- a/addons/main/script_macros.hpp +++ b/addons/main/script_macros.hpp @@ -22,10 +22,13 @@ #define PATHTOEF(var1,var2) PATHTOF_SYS(PREFIX,var1,var2) -#define LSTRING(var1) QUOTE(TRIPLES(STR,ADDON,var1)) -#define LESTRING(var1,var2) QUOTE(TRIPLES(STR,DOUBLES(PREFIX,var1),var2)) -#define CSTRING(var1) QUOTE(TRIPLES($STR,ADDON,var1)) -#define ECSTRING(var1,var2) QUOTE(TRIPLES($STR,DOUBLES(PREFIX,var1),var2)) +#ifndef STRING_MACROS_GUARD +#define STRING_MACROS_GUARD + #define LSTRING(var1) QUOTE(TRIPLES(STR,ADDON,var1)) + #define LESTRING(var1,var2) QUOTE(TRIPLES(STR,DOUBLES(PREFIX,var1),var2)) + #define CSTRING(var1) QUOTE(TRIPLES($STR,ADDON,var1)) + #define ECSTRING(var1,var2) QUOTE(TRIPLES($STR,DOUBLES(PREFIX,var1),var2)) +#endif #define GETVAR_SYS(var1,var2) getVariable [ARR_2(QUOTE(var1),var2)] #define SETVAR_SYS(var1,var2) setVariable [ARR_2(QUOTE(var1),var2)]