From d7e53c4d5a748d5ef8c934e90dc59ff23c667420 Mon Sep 17 00:00:00 2001 From: George Hazan Date: Sun, 26 Dec 2021 15:13:30 +0300 Subject: WCHAR -> wchar_t --- plugins/WinterSpeak/src/ConfigDatabase.cpp | 2 +- plugins/WinterSpeak/src/ConfigDatabase.h | 2 +- plugins/WinterSpeak/src/DialogConfigEngine.cpp | 8 ++++---- plugins/WinterSpeak/src/EventInformation.cpp | 2 +- plugins/WinterSpeak/src/MirandaDialog.cpp | 6 +++--- plugins/WinterSpeak/src/MirandaDialog.h | 2 +- plugins/WinterSpeak/src/SpeechApi40a.cpp | 4 ++-- plugins/WinterSpeak/src/UserInformation.cpp | 4 ++-- plugins/WinterSpeak/src/main.cpp | 4 ++-- 9 files changed, 17 insertions(+), 17 deletions(-) (limited to 'plugins/WinterSpeak/src') diff --git a/plugins/WinterSpeak/src/ConfigDatabase.cpp b/plugins/WinterSpeak/src/ConfigDatabase.cpp index 3b626691a4..65d419e708 100644 --- a/plugins/WinterSpeak/src/ConfigDatabase.cpp +++ b/plugins/WinterSpeak/src/ConfigDatabase.cpp @@ -125,7 +125,7 @@ void ConfigDatabase::save() //------------------------------------------------------------------------------ // private: //------------------------------------------------------------------------------ -std::wstring ConfigDatabase::DBGetContactSettingString(const char *szModule, const char *szSetting, const WCHAR *def) +std::wstring ConfigDatabase::DBGetContactSettingString(const char *szModule, const char *szSetting, const wchar_t *def) { std::wstring ret = def; DBVARIANT dbv; diff --git a/plugins/WinterSpeak/src/ConfigDatabase.h b/plugins/WinterSpeak/src/ConfigDatabase.h index 4e7f546aa1..ff511206aa 100644 --- a/plugins/WinterSpeak/src/ConfigDatabase.h +++ b/plugins/WinterSpeak/src/ConfigDatabase.h @@ -68,7 +68,7 @@ private: // def - default string if entry doesn't exist //-------------------------------------------------------------------------- static std::wstring DBGetContactSettingString(const char *szModule, - const char *szSetting, const WCHAR *def); + const char *szSetting, const wchar_t *def); VoiceDesc m_voice_desc; unsigned int m_active_flags; diff --git a/plugins/WinterSpeak/src/DialogConfigEngine.cpp b/plugins/WinterSpeak/src/DialogConfigEngine.cpp index 8041453eb7..896a091766 100644 --- a/plugins/WinterSpeak/src/DialogConfigEngine.cpp +++ b/plugins/WinterSpeak/src/DialogConfigEngine.cpp @@ -136,7 +136,7 @@ void DialogConfigEngine::save(HWND window) m_db.setVoiceDesc(desc); // store the welcome message - WCHAR *text = Hlp_GetDlgItemText(window, IDC_WELCOME_MSG); + wchar_t *text = Hlp_GetDlgItemText(window, IDC_WELCOME_MSG); m_db.setWelcomeMessage(text); } @@ -180,11 +180,11 @@ void DialogConfigEngine::updateVoices(HWND window) void DialogConfigEngine::getVoiceDesc(HWND window, VoiceDesc &desc) { // get the engine - WCHAR *text = Hlp_GetDlgItemText(window, IDC_SELECT_ENGINE); + wchar_t *text = Hlp_GetDlgItemText(window, IDC_SELECT_ENGINE); desc.engine = text; // get the voice - WCHAR *voice = Hlp_GetDlgItemText(window, IDC_SELECT_VOICE); + wchar_t *voice = Hlp_GetDlgItemText(window, IDC_SELECT_VOICE); desc.voice = voice; /*std::auto_ptr voice(new char[50]); SendDlgItemMessage(window, IDC_SELECT_VOICE, CB_GETLBTEXT, @@ -201,7 +201,7 @@ void DialogConfigEngine::getVoiceDesc(HWND window, VoiceDesc &desc) //------------------------------------------------------------------------------ std::wstring DialogConfigEngine::getEngine(HWND window) { - WCHAR *text = Hlp_GetDlgItemText(window, IDC_SELECT_ENGINE); + wchar_t *text = Hlp_GetDlgItemText(window, IDC_SELECT_ENGINE); /*char text[100]; GetDlgItemText(window, IDC_SELECT_ENGINE, mir_a2u(text), _countof(text));*/ diff --git a/plugins/WinterSpeak/src/EventInformation.cpp b/plugins/WinterSpeak/src/EventInformation.cpp index cb503f377a..becb758c95 100644 --- a/plugins/WinterSpeak/src/EventInformation.cpp +++ b/plugins/WinterSpeak/src/EventInformation.cpp @@ -71,7 +71,7 @@ std::wstring EventInformation::getMessage() //------------------------------------------------------------------------------ size_t EventInformation::getMessageSize() { - return std::wstring((WCHAR *)m_event_info.pBlob).size(); + return std::wstring((wchar_t *)m_event_info.pBlob).size(); } //------------------------------------------------------------------------------ diff --git a/plugins/WinterSpeak/src/MirandaDialog.cpp b/plugins/WinterSpeak/src/MirandaDialog.cpp index 646b8a198e..b42a580296 100644 --- a/plugins/WinterSpeak/src/MirandaDialog.cpp +++ b/plugins/WinterSpeak/src/MirandaDialog.cpp @@ -16,14 +16,14 @@ void MirandaDialog::changed(HWND window) SendMessage(GetParent(window), PSM_CHANGED, 0, 0); } -WCHAR *MirandaDialog::Hlp_GetDlgItemText(HWND hwndDlg, int nIDDlgItem) { +wchar_t *MirandaDialog::Hlp_GetDlgItemText(HWND hwndDlg, int nIDDlgItem) { int len = SendDlgItemMessage(hwndDlg, nIDDlgItem, WM_GETTEXTLENGTH, 0, 0); if (len < 0) return nullptr; - WCHAR *res = (WCHAR*)mir_alloc((len+1)*sizeof(WCHAR)); - memset(res, 0, ((len + 1) * sizeof(WCHAR))); + wchar_t *res = (wchar_t*)mir_alloc((len+1)*sizeof(wchar_t)); + memset(res, 0, ((len + 1) * sizeof(wchar_t))); GetDlgItemText(hwndDlg, nIDDlgItem, res, len+1); return res; diff --git a/plugins/WinterSpeak/src/MirandaDialog.h b/plugins/WinterSpeak/src/MirandaDialog.h index 5b66634eb4..91c518c242 100644 --- a/plugins/WinterSpeak/src/MirandaDialog.h +++ b/plugins/WinterSpeak/src/MirandaDialog.h @@ -4,7 +4,7 @@ class MirandaDialog : private MNonCopyable public: MirandaDialog(void); virtual ~MirandaDialog(void); - static WCHAR *Hlp_GetDlgItemText(HWND hwndDlg, int nIDDlgItem); + static wchar_t *Hlp_GetDlgItemText(HWND hwndDlg, int nIDDlgItem); static int ImageList_AddIcon_IconLibLoaded(HIMAGELIST hIml, int iconId); protected: void changed(HWND window); diff --git a/plugins/WinterSpeak/src/SpeechApi40a.cpp b/plugins/WinterSpeak/src/SpeechApi40a.cpp index 2c92ba48a6..b562e45369 100644 --- a/plugins/WinterSpeak/src/SpeechApi40a.cpp +++ b/plugins/WinterSpeak/src/SpeechApi40a.cpp @@ -92,8 +92,8 @@ bool SpeechApi40a::say(const std::wstring &sentence) } else { SDATA data; - data.dwSize = (DWORD)(sentence.size() * sizeof(WCHAR)); - data.pData = (WCHAR *)sentence.c_str(); + data.dwSize = (DWORD)(sentence.size() * sizeof(wchar_t)); + data.pData = (wchar_t *)sentence.c_str(); m_tts_central->TextData(CHARSET_TEXT, 0, data, nullptr, IID_ITTSBufNotifySinkA); } diff --git a/plugins/WinterSpeak/src/UserInformation.cpp b/plugins/WinterSpeak/src/UserInformation.cpp index 7769261257..cd3fa4323f 100644 --- a/plugins/WinterSpeak/src/UserInformation.cpp +++ b/plugins/WinterSpeak/src/UserInformation.cpp @@ -46,7 +46,7 @@ std::wstring UserInformation::statusString(MCONTACT user) //------------------------------------------------------------------------------ std::wstring UserInformation::statusModeString(MCONTACT user) { - WCHAR *status = Clist_GetStatusModeDescription(m_status_info[user], 0); + wchar_t *status = Clist_GetStatusModeDescription(m_status_info[user], 0); if (nullptr == status) return L""; @@ -63,7 +63,7 @@ void UserInformation::insertName(std::wstring &str, MCONTACT user) const //------------------------------------------------------------------------------ std::wstring UserInformation::nameString(MCONTACT hContact) const { - WCHAR *ret = Clist_GetContactDisplayName(hContact); + wchar_t *ret = Clist_GetContactDisplayName(hContact); if (nullptr == ret) return L""; diff --git a/plugins/WinterSpeak/src/main.cpp b/plugins/WinterSpeak/src/main.cpp index 316ae9510b..0419710736 100644 --- a/plugins/WinterSpeak/src/main.cpp +++ b/plugins/WinterSpeak/src/main.cpp @@ -32,12 +32,12 @@ CMPlugin::CMPlugin() : //----------------------------------------------------------------------------- INT_PTR status(WPARAM wParam, LPARAM lParam) { - return g_speak_config->status(reinterpret_cast(lParam), MCONTACT(wParam)); + return g_speak_config->status(reinterpret_cast(lParam), MCONTACT(wParam)); } INT_PTR message(WPARAM wParam, LPARAM lParam) { - return g_speak_config->message(reinterpret_cast(lParam), MCONTACT(wParam)); + return g_speak_config->message(reinterpret_cast(lParam), MCONTACT(wParam)); } //----------------------------------------------------------------------------- -- cgit v1.2.3