diff options
author | George Hazan <ghazan@miranda.im> | 2018-07-18 13:21:23 +0300 |
---|---|---|
committer | George Hazan <ghazan@miranda.im> | 2018-07-18 13:21:23 +0300 |
commit | e94f080dd0e19266003da01583222784c9169fc2 (patch) | |
tree | fd150c01741ebddf719bdef95fd3a622837f902c /plugins/Weather/src/weather_conv.cpp | |
parent | adf1f2e587159bb99d820faa983ef3e357d41f40 (diff) |
Weather:
- persistent connection removed due to memory corruption problems;
- warning fixed;
- version bump
Diffstat (limited to 'plugins/Weather/src/weather_conv.cpp')
-rw-r--r-- | plugins/Weather/src/weather_conv.cpp | 14 |
1 files changed, 6 insertions, 8 deletions
diff --git a/plugins/Weather/src/weather_conv.cpp b/plugins/Weather/src/weather_conv.cpp index 88822b98bc..c58751a072 100644 --- a/plugins/Weather/src/weather_conv.cpp +++ b/plugins/Weather/src/weather_conv.cpp @@ -407,17 +407,15 @@ WORD GetIcon(const wchar_t* cond, WIDATA *Data) // this function convert the string to the format with 1 upper case followed by lower case char
void CaseConv(wchar_t *str)
{
- BOOL nextUp = TRUE;
+ bool nextUp = true;
- CharLowerBuff(str, (DWORD)mir_wstrlen(str));
+ CharLowerBuffW(str, (DWORD)mir_wstrlen(str));
for (wchar_t *pstr = str; *pstr; pstr++) {
if (*pstr == ' ' || *pstr == '-')
- nextUp = TRUE;
- else {
- wchar_t ch = *pstr;
- if (nextUp)
- *pstr = (wchar_t)CharUpper((LPTSTR)ch);
- nextUp = FALSE;
+ nextUp = true;
+ else if (nextUp) {
+ CharUpperBuffW(pstr, 1);
+ nextUp = false;
}
}
}
|