summaryrefslogtreecommitdiff
path: root/plugins/NewAwaySysMod/src
diff options
context:
space:
mode:
authorGeorge Hazan <ghazan@miranda.im>2021-12-26 15:13:30 +0300
committerGeorge Hazan <ghazan@miranda.im>2021-12-26 15:13:30 +0300
commitd7e53c4d5a748d5ef8c934e90dc59ff23c667420 (patch)
tree2b0c16de953e182321a0314b6ce3b909f428731f /plugins/NewAwaySysMod/src
parent129687d805025b4e292174ffb3d224a55baf24d2 (diff)
WCHAR -> wchar_t
Diffstat (limited to 'plugins/NewAwaySysMod/src')
-rw-r--r--plugins/NewAwaySysMod/src/CString.cpp2
-rw-r--r--plugins/NewAwaySysMod/src/CString.h10
-rw-r--r--plugins/NewAwaySysMod/src/GroupCheckbox.cpp2
-rw-r--r--plugins/NewAwaySysMod/src/Services.cpp4
4 files changed, 9 insertions, 9 deletions
diff --git a/plugins/NewAwaySysMod/src/CString.cpp b/plugins/NewAwaySysMod/src/CString.cpp
index 69edcf49fc..90a1c7878e 100644
--- a/plugins/NewAwaySysMod/src/CString.cpp
+++ b/plugins/NewAwaySysMod/src/CString.cpp
@@ -269,7 +269,7 @@ TString<T>& TString<T>::operator=(const T *pStr)
template class TString<wchar_t>;
template class TString<char>;
-template class TString<WCHAR>;
+template class TString<wchar_t>;
CString db_get_s(MCONTACT hContact, const char *szModule, const char *szSetting, const char *szDefaultValue)
{
diff --git a/plugins/NewAwaySysMod/src/CString.h b/plugins/NewAwaySysMod/src/CString.h
index e079b740cd..730e92bbf5 100644
--- a/plugins/NewAwaySysMod/src/CString.h
+++ b/plugins/NewAwaySysMod/src/CString.h
@@ -98,18 +98,18 @@ private:
typedef TString<wchar_t> TCString;
typedef TString<char> CString;
-typedef TString<WCHAR> WCString;
+typedef TString<wchar_t> WCString;
#ifdef CHARARRAY_CONVERT
__inline CHARARRAY WCHAR2ANSI_ARRAY(CHARARRAY &c)
{
CHARARRAY Result;
- int Len = WideCharToMultiByte(CP_ACP, 0, (WCHAR*)c.GetData(), c.GetSize() / sizeof(WCHAR), NULL, 0, NULL, NULL);
+ int Len = WideCharToMultiByte(CP_ACP, 0, (wchar_t*)c.GetData(), c.GetSize() / sizeof(wchar_t), NULL, 0, NULL, NULL);
if (Len)
{
Result.SetAtGrow(Len - 1);
- if (!WideCharToMultiByte(CP_ACP, 0, (WCHAR*)c.GetData(), c.GetSize() / sizeof(WCHAR), Result.GetData(), Len, NULL, NULL))
+ if (!WideCharToMultiByte(CP_ACP, 0, (wchar_t*)c.GetData(), c.GetSize() / sizeof(wchar_t), Result.GetData(), Len, NULL, NULL))
{
Result.RemoveAll();
}
@@ -127,8 +127,8 @@ __inline CHARARRAY ANSI2WCHAR_ARRAY(CHARARRAY &c)
int Len = MultiByteToWideChar(CP_ACP, 0, c.GetData(), c.GetSize(), NULL, 0);
if (Len)
{
- Result.SetAtGrow(Len * sizeof(WCHAR) - 1);
- if (!MultiByteToWideChar(CP_ACP, 0, c.GetData(), c.GetSize(), (WCHAR*)Result.GetData(), Len))
+ Result.SetAtGrow(Len * sizeof(wchar_t) - 1);
+ if (!MultiByteToWideChar(CP_ACP, 0, c.GetData(), c.GetSize(), (wchar_t*)Result.GetData(), Len))
{
Result.RemoveAll();
}
diff --git a/plugins/NewAwaySysMod/src/GroupCheckbox.cpp b/plugins/NewAwaySysMod/src/GroupCheckbox.cpp
index 8fda499b09..d73f7acd4d 100644
--- a/plugins/NewAwaySysMod/src/GroupCheckbox.cpp
+++ b/plugins/NewAwaySysMod/src/GroupCheckbox.cpp
@@ -88,7 +88,7 @@ static int CALLBACK CheckboxWndProc(HWND hWnd, UINT Msg, WPARAM wParam, LPARAM l
HFONT hOldFont = (HFONT)SelectObject(hdc, dat->hFont);
RECT rcText = { 0 };
if (hTheme) {
- WCHAR *szText = (WCHAR*)_alloca(Len * sizeof(WCHAR));
+ wchar_t *szText = (wchar_t*)_alloca(Len * sizeof(wchar_t));
GetWindowTextW(hWnd, szText, Len);
GetThemeTextExtent(hTheme, hdc, BP_GROUPBOX, IsWindowEnabled(hWnd) ? GBS_NORMAL : GBS_DISABLED, szText, -1, DT_CALCRECT | DT_LEFT | DT_VCENTER | DT_SINGLELINE, nullptr, &rcText);
}
diff --git a/plugins/NewAwaySysMod/src/Services.cpp b/plugins/NewAwaySysMod/src/Services.cpp
index 52f4f55fc8..32411224e4 100644
--- a/plugins/NewAwaySysMod/src/Services.cpp
+++ b/plugins/NewAwaySysMod/src/Services.cpp
@@ -28,7 +28,7 @@ struct NAS_PROTOINFOv1
char *szProto;
union {
char *szMsg;
- WCHAR *wszMsg;
+ wchar_t *wszMsg;
wchar_t *tszMsg;
};
WORD status;
@@ -53,7 +53,7 @@ __inline void PSSetStatus(char *szProto, WORD Status, int bNoClistSetStatusMode
INT_PTR GetStatusMsgW(WPARAM wParam, LPARAM)
{
LogMessage("MS_AWAYMSG_GETSTATUSMSGW called. status=%d", wParam);
- WCHAR *szMsg = mir_wstrdup(GetDynamicStatMsg(INVALID_CONTACT_ID, nullptr, 0, wParam));
+ wchar_t *szMsg = mir_wstrdup(GetDynamicStatMsg(INVALID_CONTACT_ID, nullptr, 0, wParam));
LogMessage("returned szMsgW:\n%S", szMsg ? szMsg : L"NULL");
return (INT_PTR)szMsg;
}