diff options
Diffstat (limited to 'protocols/Weather')
-rw-r--r-- | protocols/Weather/src/weather_contacts.cpp | 2 | ||||
-rw-r--r-- | protocols/Weather/src/weather_conv.cpp | 16 | ||||
-rw-r--r-- | protocols/Weather/src/weather_data.cpp | 2 | ||||
-rw-r--r-- | protocols/Weather/src/weather_ini.cpp | 2 |
4 files changed, 13 insertions, 9 deletions
diff --git a/protocols/Weather/src/weather_contacts.cpp b/protocols/Weather/src/weather_contacts.cpp index f572b29564..b22f8a2222 100644 --- a/protocols/Weather/src/weather_contacts.cpp +++ b/protocols/Weather/src/weather_contacts.cpp @@ -205,7 +205,7 @@ static INT_PTR CALLBACK DlgProcChange(HWND hwndDlg, UINT msg, WPARAM wParam, LPA // check if there are 2 parts in the ID (svc/id) seperated by "/" // if not, don't let user change the setting GetDlgItemText(hwndDlg, IDC_ID, str, _countof(str)); - chop = wcsstr(str, L"/"); + chop = wcschr(str, '/'); if (chop == nullptr) EnableWindow(GetDlgItem(hwndDlg, IDC_CHANGE), FALSE); else diff --git a/protocols/Weather/src/weather_conv.cpp b/protocols/Weather/src/weather_conv.cpp index 9ce8a16ad3..60577e99aa 100644 --- a/protocols/Weather/src/weather_conv.cpp +++ b/protocols/Weather/src/weather_conv.cpp @@ -543,9 +543,11 @@ INT_PTR GetDisplaySvcFunc(WPARAM wParam, LPARAM lParam) // pszID = original 2-part id, return the service internal name void GetSvc(wchar_t *pszID) { - wchar_t *chop = wcsstr(pszID, L"/"); - if (chop != nullptr) *chop = '\0'; - else pszID[0] = 0; + wchar_t *chop = wcschr(pszID, '/'); + if (chop != nullptr) + *chop = '\0'; + else + pszID[0] = 0; } // get the id use for update without the service internal name @@ -553,9 +555,11 @@ void GetSvc(wchar_t *pszID) // pszID = original 2-part id, return the single part id void GetID(wchar_t *pszID) { - wchar_t *chop = wcsstr(pszID, L"/"); - if (chop != nullptr) mir_wstrcpy(pszID, chop + 1); - else pszID[0] = 0; + wchar_t *chop = wcschr(pszID, '/'); + if (chop != nullptr) + mir_wstrcpy(pszID, chop + 1); + else + pszID[0] = 0; } //============ WEATHER ERROR CODE ============ diff --git a/protocols/Weather/src/weather_data.cpp b/protocols/Weather/src/weather_data.cpp index e36ae9dc5b..c6d88e4f1f 100644 --- a/protocols/Weather/src/weather_data.cpp +++ b/protocols/Weather/src/weather_data.cpp @@ -270,7 +270,7 @@ void GetDataValue(WIDATAITEM *UpdateData, wchar_t *Data, wchar_t** szData) if (UpdateData->End[0] != 0) end = wcsstr(szInfo, UpdateData->End); else - end = wcsstr(szInfo, L" "); + end = wcschr(szInfo, ' '); if (end != nullptr) { // set the ending location diff --git a/protocols/Weather/src/weather_ini.cpp b/protocols/Weather/src/weather_ini.cpp index bd60fcaaa0..81a2831736 100644 --- a/protocols/Weather/src/weather_ini.cpp +++ b/protocols/Weather/src/weather_ini.cpp @@ -371,7 +371,7 @@ static void LoadStationData(wchar_t *pszFile, wchar_t *pszShortFile, WIDATA *Dat } } // ignore comments and all lines without an '=' - Value = strstr(Line, "="); + Value = strchr(Line, '='); if (Value == nullptr) continue; // get the string before '=' (ValName) and after '=' (Value) |