From 637559f4c7bcd3f9780b5e343b86cbad3b13d967 Mon Sep 17 00:00:00 2001 From: mataes2007 Date: Wed, 8 Feb 2012 15:49:08 +0000 Subject: IEView: code formating git-svn-id: http://miranda-plugins.googlecode.com/svn/trunk@270 e753b5eb-9565-29b2-b5c5-2cc6f99dfbcb --- IEView/Template.cpp | 36 ++++++++++++++++++------------------ 1 file changed, 18 insertions(+), 18 deletions(-) (limited to 'IEView/Template.cpp') diff --git a/IEView/Template.cpp b/IEView/Template.cpp index 23e9a9c..9d6ce52 100644 --- a/IEView/Template.cpp +++ b/IEView/Template.cpp @@ -42,7 +42,7 @@ Token::Token(int type, const char *text, int escape) { if (text!=NULL) { this->text = Utils::dupString(text); } else { - this->text = NULL; + this->text = NULL; } } @@ -186,13 +186,13 @@ void Template::tokenize() { } if (newTokenType != Token::PLAIN) { if (str[i + newTokenSize] == '%') { - //newTokenSize++; + //newTokenSize++; } str[i] = '\0'; } if ((lastTokenType!=newTokenType || lastTokenEscape != newTokenEscape) && i!=lastTokenStart) { if (lastTokenType == Token::PLAIN) { - newToken = new Token(lastTokenType, str+lastTokenStart, lastTokenEscape); + newToken = new Token(lastTokenType, str+lastTokenStart, lastTokenEscape); } else { newToken = new Token(lastTokenType, NULL, lastTokenEscape); } @@ -344,16 +344,16 @@ TemplateMap* TemplateMap::loadTemplateFile(const char *id, const char *filename, char *templateText = NULL; int templateTextSize = 0; while (fgets(store, sizeof(store), fh) != NULL) { - if (sscanf(store, "%s", tmp2) == EOF) continue; - //template start - bool bFound = false; - for (unsigned i = 0; i < sizeof(templateNames) / sizeof (templateNames[0]); i++) { - if (!strncmp(store, templateNames[i].tokenString, templateNames[i].tokenLen)) { - bFound = true; - break; - } - } - if (bFound) { + if (sscanf(store, "%s", tmp2) == EOF) continue; + //template start + bool bFound = false; + for (unsigned i = 0; i < sizeof(templateNames) / sizeof (templateNames[0]); i++) { + if (!strncmp(store, templateNames[i].tokenString, templateNames[i].tokenLen)) { + bFound = true; + break; + } + } + if (bFound) { if (wasTemplate) { tmap->addTemplate(lastTemplate, templateText); } @@ -363,7 +363,7 @@ TemplateMap* TemplateMap::loadTemplateFile(const char *id, const char *filename, templateText = NULL; templateTextSize = 0; wasTemplate = true; - sscanf(store, "