From f061e0f29ded10cfe40215f1433c86e1fe7a12bc Mon Sep 17 00:00:00 2001 From: XoD Date: Wed, 21 Dec 2011 20:55:35 +0100 Subject: [PATCH] Fix some constant string type in Script_Compiler Signed-off-by: XoD --- neo/d3xp/script/Script_Compiler.cpp | 2 +- neo/d3xp/script/Script_Compiler.h | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/neo/d3xp/script/Script_Compiler.cpp b/neo/d3xp/script/Script_Compiler.cpp index 183c9dd..48af6e0 100644 --- a/neo/d3xp/script/Script_Compiler.cpp +++ b/neo/d3xp/script/Script_Compiler.cpp @@ -38,7 +38,7 @@ If you have questions concerning this license or the applicable additional terms #define TOP_PRIORITY 7 bool idCompiler::punctuationValid[ 256 ]; -char *idCompiler::punctuation[] = { +const char *idCompiler::punctuation[] = { "+=", "-=", "*=", "/=", "%=", "&=", "|=", "++", "--", "&&", "||", "<=", ">=", "==", "!=", "::", ";", ",", "~", "!", "*", "/", "%", "(", ")", "-", "+", diff --git a/neo/d3xp/script/Script_Compiler.h b/neo/d3xp/script/Script_Compiler.h index 51b5918..5a62ddc 100644 --- a/neo/d3xp/script/Script_Compiler.h +++ b/neo/d3xp/script/Script_Compiler.h @@ -31,8 +31,8 @@ If you have questions concerning this license or the applicable additional terms const char * const RESULT_STRING = ""; typedef struct opcode_s { - char *name; - char *opname; + const char *name; + const char *opname; int priority; bool rightAssociative; idVarDef *type_a; @@ -197,7 +197,7 @@ enum { class idCompiler { private: static bool punctuationValid[ 256 ]; - static char *punctuation[]; + static const char *punctuation[]; idParser parser; idParser *parserPtr;