From: pjrm Date: Thu, 11 Oct 2007 13:55:31 +0000 (+0000) Subject: dom/xpathparser.h: (Lookup::sval): Change from char* to char const *. Address some... X-Git-Url: https://git.tokkee.org/?a=commitdiff_plain;h=49df4b894c692ed5585756a549290bc3f470db4d;p=inkscape.git dom/xpathparser.h: (Lookup::sval): Change from char* to char const *. Address some related char* string literal warnings from g++-4.2. --- diff --git a/src/dom/xpathparser.h b/src/dom/xpathparser.h index 2a604aa61..28523027b 100644 --- a/src/dom/xpathparser.h +++ b/src/dom/xpathparser.h @@ -63,7 +63,7 @@ typedef dom::NodeList NodeList; typedef struct { int ival; - char *sval; + char const *sval; } LookupEntry; @@ -260,8 +260,8 @@ public: { if (type == OPERATOR) { - char *tokenStr = "unknown"; - for (LookupEntry *entry = operatorTable; entry->sval ; entry++) + char const *tokenStr = "unknown"; + for (LookupEntry const *entry = operatorTable; entry->sval ; entry++) { if (entry->ival == ival) { @@ -273,7 +273,7 @@ public: } else if (type == NODE_TYPE) { - char *tokenStr = "unknown"; + char const *tokenStr = "unknown"; for (LookupEntry *entry = nodeTypeTable; entry->sval ; entry++) { if (entry->ival == ival) @@ -286,7 +286,7 @@ public: } else if (type == AXIS_NAME) { - char *tokenStr = "unknown"; + char const *tokenStr = "unknown"; for (LookupEntry *entry = axisNameTable; entry->sval ; entry++) { if (entry->ival == ival) @@ -309,7 +309,7 @@ public: printf("#%f\n", dval); else { - char *tokenStr = "unknown"; + char const *tokenStr = "unknown"; for (LookupEntry *entry = exprTokenTable; entry->sval ; entry++) { if (entry->ival == type)