diff options
-rw-r--r-- | render.c | 4 | ||||
-rw-r--r-- | xml/function.c | 2 |
2 files changed, 3 insertions, 3 deletions
@@ -748,7 +748,6 @@ cxType cText2SkinRender::GetToken(const txToken &Token) cxType res = mRender->GetTokenData(Token); if (Token.Attrib.Type == aClean) { std::string str = res.String(); - int pos = -1; if (Token.Type == tMenuCurrent) { const char *ptr = str.c_str(); @@ -761,6 +760,7 @@ cxType cText2SkinRender::GetToken(const txToken &Token) Dprintf("MenuCurrent result: |%s|\n", res.String().c_str()); } else if (Token.Type == tMenuTitle) { + int pos; if ((pos = str.find(" - ")) != -1) { str.erase(pos); while (str[str.length() - 1] == ' ') @@ -780,9 +780,9 @@ cxType cText2SkinRender::GetToken(const txToken &Token) } else if (Token.Attrib.Type == aRest) { std::string str = res.String(); - int pos = -1; if (Token.Type == tMenuTitle) { + int pos; if ((pos = str.find(" - ")) != -1) { str.erase(0, pos + 3); while (str[0] == ' ') diff --git a/xml/function.c b/xml/function.c index c9994e9..62c097f 100644 --- a/xml/function.c +++ b/xml/function.c @@ -54,7 +54,6 @@ bool cxFunction::Parse(const std::string &Text) const char *text = Text.c_str(); const char *ptr = text, *last = text; eType type = undefined_function; - int inExpr = 0; cxFunction *expr; if (*ptr == '\'' || *ptr == '{') { @@ -95,6 +94,7 @@ bool cxFunction::Parse(const std::string &Text) } else { // expression + int inExpr = 0; for (; *ptr; ++ptr) { if (*ptr == '(') { if (inExpr++ == 0) { |