diff options
author | Ville Skyttä <ville.skytta@iki.fi> | 2011-11-05 23:07:55 +0200 |
---|---|---|
committer | Ville Skyttä <ville.skytta@iki.fi> | 2011-11-05 23:07:55 +0200 |
commit | da936332dc117580a0f6a04aa17525e1c31b77d9 (patch) | |
tree | 7e0f908bf8ac788f07d79bf6eeed39b0dc4c00d4 /render.c | |
parent | fbc4f38c31feba097d62271e8cd45dcf8533e42f (diff) | |
download | vdr-plugin-text2skin-da936332dc117580a0f6a04aa17525e1c31b77d9.tar.gz vdr-plugin-text2skin-da936332dc117580a0f6a04aa17525e1c31b77d9.tar.bz2 |
Reduce scope of some variables.
Diffstat (limited to 'render.c')
-rw-r--r-- | render.c | 4 |
1 files changed, 2 insertions, 2 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] == ' ') |