summaryrefslogtreecommitdiff
path: root/protocols/Weather/weather_conv.cpp
diff options
context:
space:
mode:
authorGeorge Hazan <george.hazan@gmail.com>2012-06-20 06:52:26 +0000
committerGeorge Hazan <george.hazan@gmail.com>2012-06-20 06:52:26 +0000
commitb766ebf1a1091dcc2859a92da300c44e0e432a84 (patch)
tree833eb906adc49c21c799b5bd222e714338dfebd8 /protocols/Weather/weather_conv.cpp
parent4c7aed90685d65bc150a16e901542471041bd148 (diff)
- avatars fix for Weather
- code cleaning git-svn-id: http://svn.miranda-ng.org/main/trunk@495 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'protocols/Weather/weather_conv.cpp')
-rw-r--r--protocols/Weather/weather_conv.cpp15
1 files changed, 7 insertions, 8 deletions
diff --git a/protocols/Weather/weather_conv.cpp b/protocols/Weather/weather_conv.cpp
index 8cab451181..ff5e37cb58 100644
--- a/protocols/Weather/weather_conv.cpp
+++ b/protocols/Weather/weather_conv.cpp
@@ -37,7 +37,7 @@ BOOL is_number(TCHAR *s)
// don't care anything that comes after it
while(*s != '\0')
{
- if (*s >= '0' && *s <='9') return TRUE;
+ if (*s >= '0' && *s <= '9') return TRUE;
else if (*s == ' ');
else if (*s != '+' && *s != '-') return FALSE;
else if ((*s == '+' || *s == '-') && !tag) tag = TRUE;
@@ -417,7 +417,7 @@ void CaseConv(TCHAR *str)
CharLowerBuff(str, (DWORD)_tcslen(str));
for(pstr = str; *pstr; pstr++) {
- if (*pstr==' ' || *pstr=='-')
+ if (*pstr == ' ' || *pstr == '-')
nextUp = TRUE;
else {
TCHAR ch = *(TCHAR*)pstr;
@@ -452,13 +452,12 @@ void TrimString(WCHAR *str)
// convert \t to tab and \n to linefeed
void ConvertBackslashes(char *str)
{
- char *pstr;
- for ( pstr=str; *pstr; pstr = CharNextA(pstr)) {
- if (*pstr=='\\') {
+ for (char *pstr=str; *pstr; pstr = CharNextA(pstr)) {
+ if (*pstr == '\\') {
switch(pstr[1]) {
- case 'n': *pstr='\n'; break;
- case 't': *pstr='\t'; break;
- default: *pstr=pstr[1]; break;
+ case 'n': *pstr = '\n'; break;
+ case 't': *pstr = '\t'; break;
+ default: *pstr = pstr[1]; break;
}
memmove(pstr+1, pstr+2, strlen(pstr+2)+1);
} } }