diff options
| author | George Hazan <george.hazan@gmail.com> | 2025-01-24 19:47:16 +0300 |
|---|---|---|
| committer | George Hazan <george.hazan@gmail.com> | 2025-01-24 19:47:16 +0300 |
| commit | a3139fc57f7d7f6a2d0cbcd6a38041848f24d203 (patch) | |
| tree | 3d3a1eadc8ca1f35e3508c756239e9115003df18 | |
| parent | 4c43d12f03c53aa53585efa40daf22580eae9c45 (diff) | |
more code removed
| -rw-r--r-- | protocols/Weather/src/stdafx.h | 6 | ||||
| -rw-r--r-- | protocols/Weather/src/weather_data.cpp | 47 |
2 files changed, 0 insertions, 53 deletions
diff --git a/protocols/Weather/src/stdafx.h b/protocols/Weather/src/stdafx.h index ac1f1bd16f..ebfb15e6f6 100644 --- a/protocols/Weather/src/stdafx.h +++ b/protocols/Weather/src/stdafx.h @@ -165,12 +165,6 @@ wchar_t *GetError(int code); int DBGetData(MCONTACT hContact, char *setting, DBVARIANT *dbv);
-void wSetData(char *&Data, const char *Value);
-void wSetData(wchar_t *&Data, const char *Value);
-void wSetData(wchar_t *&Data, const wchar_t *Value);
-void wfree(char *&Data);
-void wfree(wchar_t *&Data);
-
void DBDataManage(MCONTACT hContact, uint16_t Mode, WPARAM wParam, LPARAM lParam);
/////////////////////////////////////////////////////////////////////////////////////////
diff --git a/protocols/Weather/src/weather_data.cpp b/protocols/Weather/src/weather_data.cpp index 88c1572f43..c926787c81 100644 --- a/protocols/Weather/src/weather_data.cpp +++ b/protocols/Weather/src/weather_data.cpp @@ -346,53 +346,6 @@ void CWeatherProto::GetDataValue(WIDATAITEM *UpdateData, wchar_t *Data, wchar_t } ///////////////////////////////////////////////////////////////////////////////////////// -// copy a string into a new memory location -// Data = the field the data is copied to -// Value = the original string, the string where data is copied from - -bool g_bIsUtf = false; - -void wSetData(char *&Data, const char *Value) -{ - if (Value[0] != 0) - Data = mir_strdup(Value); - else - Data = ""; -} - -void wSetData(wchar_t *&Data, const char *Value) -{ - if (Value[0] != 0) - Data = (g_bIsUtf) ? mir_utf8decodeW(Value) : mir_a2u(Value); - else - Data = L""; -} - -void wSetData(wchar_t *&Data, const wchar_t *Value) -{ - if (Value[0] != 0) - Data = mir_wstrdup(Value); - else - Data = L""; -} - -// A safer free function that free memory for a string -// Data = the string occuping the data to be freed -void wfree(char *&Data) -{ - if (Data && mir_strlen(Data) > 0) - mir_free(Data); - Data = nullptr; -} - -void wfree(wchar_t *&Data) -{ - if (Data && mir_wstrlen(Data) > 0) - mir_free(Data); - Data = nullptr; -} - -///////////////////////////////////////////////////////////////////////////////////////// // get single setting that is found // szSetting = the setting name // lparam = the counter |
