summaryrefslogtreecommitdiff
path: root/plugins/Weather/src/weather_data.cpp
diff options
context:
space:
mode:
authorKirill Volinsky <mataes2007@gmail.com>2015-05-22 12:49:22 +0000
committerKirill Volinsky <mataes2007@gmail.com>2015-05-22 12:49:22 +0000
commitb280d2eae93fb22b4fdb45218d8a06287a97030e (patch)
treef4e0d9921a57bafdb608a55a107bad3408b8f909 /plugins/Weather/src/weather_data.cpp
parent159b565b390687258ee65a3b66596e118752063c (diff)
replace _tcscmp to mir_tstrcmp
git-svn-id: http://svn.miranda-ng.org/main/trunk@13753 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'plugins/Weather/src/weather_data.cpp')
-rw-r--r--plugins/Weather/src/weather_data.cpp20
1 files changed, 10 insertions, 10 deletions
diff --git a/plugins/Weather/src/weather_data.cpp b/plugins/Weather/src/weather_data.cpp
index 1908fe3115..02ee823423 100644
--- a/plugins/Weather/src/weather_data.cpp
+++ b/plugins/Weather/src/weather_data.cpp
@@ -162,7 +162,7 @@ void EraseAllInfo()
// get the handle of the default station
if (opt.DefStn == NULL) {
if ( !db_get_ts(hContact,WEATHERPROTONAME, "ID",&dbv)) {
- if ( !_tcscmp(dbv.ptszVal, opt.Default))
+ if ( !mir_tstrcmp(dbv.ptszVal, opt.Default))
opt.DefStn = hContact;
db_free(&dbv);
}
@@ -195,11 +195,11 @@ void ConvertDataValue(WIDATAITEM *UpdateData, TCHAR *Data)
TCHAR str[MAX_DATA_LEN];
// convert the unit
- if ( _tcscmp(Data, TranslateT("<Error>")) && _tcscmp(Data, NODATA) && _tcscmp(Data, TranslateTS(NODATA))) {
+ if ( mir_tstrcmp(Data, TranslateT("<Error>")) && mir_tstrcmp(Data, NODATA) && mir_tstrcmp(Data, TranslateTS(NODATA))) {
// temperature
- if ( !_tcscmp(UpdateData->Name, _T("Temperature")) || !_tcscmp(UpdateData->Name, _T("High")) ||
- !_tcscmp(UpdateData->Name, _T("Low")) || !_tcscmp(UpdateData->Name, _T("Feel")) ||
- !_tcscmp(UpdateData->Name, _T("Dewpoint")) ||
+ if ( !mir_tstrcmp(UpdateData->Name, _T("Temperature")) || !mir_tstrcmp(UpdateData->Name, _T("High")) ||
+ !mir_tstrcmp(UpdateData->Name, _T("Low")) || !mir_tstrcmp(UpdateData->Name, _T("Feel")) ||
+ !mir_tstrcmp(UpdateData->Name, _T("Dewpoint")) ||
!_tcsicmp(UpdateData->Unit, _T("C")) || !_tcsicmp(UpdateData->Unit, _T("F")) ||
!_tcsicmp(UpdateData->Unit, _T("K")))
{
@@ -207,7 +207,7 @@ void ConvertDataValue(WIDATAITEM *UpdateData, TCHAR *Data)
_tcscpy(Data, str);
}
// pressure
- else if ( !_tcscmp(UpdateData->Name, _T("Pressure")) || !_tcsicmp(UpdateData->Unit, _T("HPA")) ||
+ else if ( !mir_tstrcmp(UpdateData->Name, _T("Pressure")) || !_tcsicmp(UpdateData->Unit, _T("HPA")) ||
!_tcsicmp(UpdateData->Unit, _T("KPA")) || !_tcsicmp(UpdateData->Unit, _T("MB")) ||
!_tcsicmp(UpdateData->Unit, _T("TORR")) || !_tcsicmp(UpdateData->Unit, _T("IN")) ||
!_tcsicmp(UpdateData->Unit, _T("MM")))
@@ -216,7 +216,7 @@ void ConvertDataValue(WIDATAITEM *UpdateData, TCHAR *Data)
_tcscpy(Data, str);
}
// speed
- else if ( !_tcscmp(UpdateData->Name, _T("Wind Speed")) || !_tcsicmp(UpdateData->Unit, _T("KM/H")) ||
+ else if ( !mir_tstrcmp(UpdateData->Name, _T("Wind Speed")) || !_tcsicmp(UpdateData->Unit, _T("KM/H")) ||
!_tcsicmp(UpdateData->Unit, _T("M/S")) || !_tcsicmp(UpdateData->Unit, _T("MPH")) ||
!_tcsicmp(UpdateData->Unit, _T("KNOTS")))
{
@@ -224,14 +224,14 @@ void ConvertDataValue(WIDATAITEM *UpdateData, TCHAR *Data)
_tcscpy(Data, str);
}
// visibility
- else if ( !_tcscmp(UpdateData->Name, _T("Visibility")) || !_tcsicmp(UpdateData->Unit, _T("KM")) ||
+ else if ( !mir_tstrcmp(UpdateData->Name, _T("Visibility")) || !_tcsicmp(UpdateData->Unit, _T("KM")) ||
!_tcsicmp(UpdateData->Unit, _T("MILES")))
{
GetDist(Data, UpdateData->Unit, str);
_tcscpy(Data, str);
}
// elevation
- else if ( !_tcscmp(UpdateData->Name, _T("Elevation")) || !_tcsicmp(UpdateData->Unit, _T("FT")) ||
+ else if ( !mir_tstrcmp(UpdateData->Name, _T("Elevation")) || !_tcsicmp(UpdateData->Unit, _T("FT")) ||
!_tcsicmp(UpdateData->Unit, _T("M")))
{
GetElev(Data, UpdateData->Unit, str);
@@ -336,7 +336,7 @@ void GetDataValue(WIDATAITEM *UpdateData, TCHAR *Data, TCHAR** szData)
++startloc;
// prevent crashes if the string go over maximun length -> generate an error
if (respos >= MAX_DATA_LEN) {
- if (opt.ShowWarnings && UpdateData->Name[0] != 0 && _tcscmp(UpdateData->Name, _T("Ignore"))) {
+ if (opt.ShowWarnings && UpdateData->Name[0] != 0 && mir_tstrcmp(UpdateData->Name, _T("Ignore"))) {
mir_sntprintf(Data, MAX_DATA_LEN, TranslateT("Error when obtaining data: %s"), UpdateData->Name);
WPShowMessage(Data, SM_WARNING);
}