From 17972b5d06213f48a1b5bd57c11ebf8831631738 Mon Sep 17 00:00:00 2001 From: Randy Heit Date: Sun, 3 Apr 2016 19:15:00 -0500 Subject: [PATCH] Revert "Add "support" for user string variables in DECORATE" - This reverts commit c90a1c0c9627d2cb4d5ad105ae7020582c8b2cab. - DECORATE looks to be very dependant on functions that take strings as parameters receiving those strings as constants and not as expressions, so being able to declare string variables with DECORATE is pretty much useless. --- src/thingdef/thingdef_parse.cpp | 11 +++-------- 1 file changed, 3 insertions(+), 8 deletions(-) diff --git a/src/thingdef/thingdef_parse.cpp b/src/thingdef/thingdef_parse.cpp index bf929128b..f5359a7d8 100644 --- a/src/thingdef/thingdef_parse.cpp +++ b/src/thingdef/thingdef_parse.cpp @@ -533,17 +533,12 @@ static void ParseUserVariable (FScanner &sc, PSymbolTable *symt, PClassActor *cl // Read the type and make sure it's acceptable. sc.MustGetAnyToken(); - switch (sc.TokenType) + if (sc.TokenType != TK_Int && sc.TokenType != TK_Float) { - case TK_Int: type = TypeSInt32; break; - case TK_Float: type = TypeFloat64; break; - case TK_String: type = TypeString; break; - default: - type = TypeError; - sc.ScriptMessage("User variables must be of type 'int' or 'float' or 'string'"); + sc.ScriptMessage("User variables must be of type 'int' or 'float'"); FScriptPosition::ErrorCounter++; - break; } + type = sc.TokenType == TK_Int ? (PType *)TypeSInt32 : (PType *)TypeFloat64; sc.MustGetToken(TK_Identifier); // For now, restrict user variables to those that begin with "user_" to guarantee