diff options
author | Kirill Volinsky <mataes2007@gmail.com> | 2014-12-15 16:34:37 +0000 |
---|---|---|
committer | Kirill Volinsky <mataes2007@gmail.com> | 2014-12-15 16:34:37 +0000 |
commit | 54ecbb3cf0ddb2576292d0b1714f56cd765ea292 (patch) | |
tree | c2646e421846bb51094ba52735bebe65dd32f02e /plugins/IEView/src/Template.cpp | |
parent | e16d8a339254b1e55bfffeb8e88bbf5990686dcf (diff) |
IEView: changed warning lavel to w4
git-svn-id: http://svn.miranda-ng.org/main/trunk@11438 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'plugins/IEView/src/Template.cpp')
-rw-r--r-- | plugins/IEView/src/Template.cpp | 36 |
1 files changed, 18 insertions, 18 deletions
diff --git a/plugins/IEView/src/Template.cpp b/plugins/IEView/src/Template.cpp index b1b078c4cd..8c9d8e7acb 100644 --- a/plugins/IEView/src/Template.cpp +++ b/plugins/IEView/src/Template.cpp @@ -90,7 +90,7 @@ Template::~Template() mir_free(name);
Token *ptr = tokens, *ptr2;
tokens = NULL;
- for (;ptr!=NULL;ptr = ptr2) {
+ for (; ptr != NULL; ptr = ptr2) {
ptr2 = ptr->getNext();
delete ptr;
}
@@ -171,18 +171,18 @@ void Template::tokenize() int lastTokenType = Token::PLAIN;
int lastTokenEscape = 0;
int l = (int)strlen(str);
- for (int i=0, lastTokenStart=0; i<=l;) {
+ for (int i = 0, lastTokenStart = 0; i <= l;) {
Token *newToken;
int newTokenType = 0, newTokenSize = 0, newTokenEscape = 0;
- if (str[i]=='\0') {
+ if (str[i] == '\0') {
newTokenType = Token::END;
newTokenSize = 1;
newTokenEscape = 0;
}
else {
bool found = false;
- for (unsigned int j=0; j<(sizeof(tokenNames)/sizeof(tokenNames[0])); j++) {
- if (!strncmp(str+i, tokenNames[j].tokenString, tokenNames[j].tokenLen)) {
+ for (unsigned int j = 0; j < (sizeof(tokenNames) / sizeof(tokenNames[0])); j++) {
+ if (!strncmp(str + i, tokenNames[j].tokenString, tokenNames[j].tokenLen)) {
newTokenType = tokenNames[j].token;
newTokenSize = tokenNames[j].tokenLen;
newTokenEscape = tokenNames[j].escape;
@@ -204,7 +204,7 @@ void Template::tokenize() }
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);
@@ -251,7 +251,7 @@ TemplateMap::~TemplateMap() TemplateMap* TemplateMap::add(const char *id, const char *filename)
{
TemplateMap *map;
- for (map=mapList; map!=NULL; map=map->next) {
+ for (map = mapList; map != NULL; map = map->next) {
if (!strcmp(map->name, id)) {
map->clear();
map->setFilename(filename);
@@ -277,7 +277,7 @@ void TemplateMap::clear() Template *ptr, *ptr2;
ptr = entries;
entries = NULL;
- for (;ptr!=NULL;ptr=ptr2) {
+ for (; ptr != NULL; ptr = ptr2) {
ptr2 = ptr->getNext();
delete ptr;
}
@@ -338,7 +338,7 @@ static TokenDef templateNames[] = { TemplateMap* TemplateMap::loadTemplateFile(const char *id, const char *filename, bool onlyInfo)
{
char lastTemplate[1024], tmp2[1024];
- unsigned int i=0;
+ unsigned int i = 0;
if (filename == NULL || strlen(filename) == 0)
return NULL;
@@ -385,21 +385,21 @@ TemplateMap* TemplateMap::loadTemplateFile(const char *id, const char *filename, free(templateText), templateText = NULL;
fclose(fh);
- static const char *groupTemplates[] = {"MessageInGroupStart", "MessageInGroupInner",
- "hMessageInGroupStart", "hMessageInGroupInner",
- "MessageOutGroupStart", "MessageOutGroupInner",
- "hMessageOutGroupStart", "hMessageOutGroupInner"};
+ static const char *groupTemplates[] = { "MessageInGroupStart", "MessageInGroupInner",
+ "hMessageInGroupStart", "hMessageInGroupInner",
+ "MessageOutGroupStart", "MessageOutGroupInner",
+ "hMessageOutGroupStart", "hMessageOutGroupInner" };
tmap->grouping = true;
- for (i = 0; i<SIZEOF(groupTemplates); i++) {
- if (tmap->getTemplate(groupTemplates[i])== NULL) {
+ for (i = 0; i < SIZEOF(groupTemplates); i++) {
+ if (tmap->getTemplate(groupTemplates[i]) == NULL) {
tmap->grouping = false;
break;
}
}
- static const char *rtlTemplates[] = {"MessageInRTL", "MessageOutRTL"}; //"HTMLStartRTL",
+ static const char *rtlTemplates[] = { "MessageInRTL", "MessageOutRTL" }; //"HTMLStartRTL",
tmap->rtl = true;
- for (i=0; i<SIZEOF(rtlTemplates); i++) {
- if (tmap->getTemplate(rtlTemplates[i])== NULL) {
+ for (i = 0; i < SIZEOF(rtlTemplates); i++) {
+ if (tmap->getTemplate(rtlTemplates[i]) == NULL) {
tmap->rtl = false;
break;
}
|