From 62a186697df33c96dc1a6dac0f4dfc38652fb96f Mon Sep 17 00:00:00 2001 From: George Hazan Date: Sun, 26 Dec 2021 16:39:04 +0300 Subject: BYTE -> uint8_t --- plugins/Variables/src/contact.cpp | 6 +++--- plugins/Variables/src/options.cpp | 8 ++++---- plugins/Variables/src/parse_miranda.cpp | 2 +- plugins/Variables/src/parse_system.cpp | 4 ++-- plugins/Variables/src/stdafx.h | 4 ++-- 5 files changed, 12 insertions(+), 12 deletions(-) (limited to 'plugins/Variables/src') diff --git a/plugins/Variables/src/contact.cpp b/plugins/Variables/src/contact.cpp index 42a9357bde..2f1420d1e4 100644 --- a/plugins/Variables/src/contact.cpp +++ b/plugins/Variables/src/contact.cpp @@ -94,7 +94,7 @@ static OBJLIST arContactCache(20, SortContactCache); static mir_cs csContactCache; // converts a string into a CNF_ type -BYTE getContactInfoType(wchar_t* type) +uint8_t getContactInfoType(wchar_t* type) { if (type == nullptr || mir_wstrlen(type) == 0) return 0; @@ -107,7 +107,7 @@ BYTE getContactInfoType(wchar_t* type) } // returns info about a contact as a string -wchar_t* getContactInfoT(BYTE type, MCONTACT hContact) +wchar_t* getContactInfoT(uint8_t type, MCONTACT hContact) { /* returns dynamic allocated buffer with info, or NULL if failed */ if (hContact == NULL) @@ -262,7 +262,7 @@ MCONTACT getContactFromString(const wchar_t *tszContact, DWORD dwFlags, int nMat // CNF_ (exact) if ((dwFlags & CI_CNFINFO) && !bMatch) { - ptrW szFind(getContactInfoT((BYTE)(dwFlags & ~CI_CNFINFO), hContact)); + ptrW szFind(getContactInfoT((uint8_t)(dwFlags & ~CI_CNFINFO), hContact)); if (!mir_wstrcmp(tszContact, szFind)) bMatch = true; } diff --git a/plugins/Variables/src/options.cpp b/plugins/Variables/src/options.cpp index 116bd46b14..d1f22f8258 100644 --- a/plugins/Variables/src/options.cpp +++ b/plugins/Variables/src/options.cpp @@ -94,10 +94,10 @@ static INT_PTR CALLBACK SetOptsDlgProc(HWND hwndDlg, UINT msg, WPARAM wParam, LP mir_free(szFormatText); } - g_plugin.setByte(SETTING_PARSEATSTARTUP, (BYTE)(IsDlgButtonChecked(hwndDlg, IDC_PARSEATSTARTUP) ? 1 : 0)); - g_plugin.setByte(SETTING_STRIPCRLF, (BYTE)(IsDlgButtonChecked(hwndDlg, IDC_STRIPCRLF) ? 1 : 0)); - g_plugin.setByte(SETTING_STRIPWS, (BYTE)(IsDlgButtonChecked(hwndDlg, IDC_STRIPWS) ? 1 : 0)); - g_plugin.setByte(SETTING_STRIPALL, (BYTE)(IsDlgButtonChecked(hwndDlg, IDC_STRIPALL) ? 1 : 0)); + g_plugin.setByte(SETTING_PARSEATSTARTUP, (uint8_t)(IsDlgButtonChecked(hwndDlg, IDC_PARSEATSTARTUP) ? 1 : 0)); + g_plugin.setByte(SETTING_STRIPCRLF, (uint8_t)(IsDlgButtonChecked(hwndDlg, IDC_STRIPCRLF) ? 1 : 0)); + g_plugin.setByte(SETTING_STRIPWS, (uint8_t)(IsDlgButtonChecked(hwndDlg, IDC_STRIPWS) ? 1 : 0)); + g_plugin.setByte(SETTING_STRIPALL, (uint8_t)(IsDlgButtonChecked(hwndDlg, IDC_STRIPALL) ? 1 : 0)); } break; diff --git a/plugins/Variables/src/parse_miranda.cpp b/plugins/Variables/src/parse_miranda.cpp index 452989048d..0373b33837 100644 --- a/plugins/Variables/src/parse_miranda.cpp +++ b/plugins/Variables/src/parse_miranda.cpp @@ -113,7 +113,7 @@ static wchar_t* parseContactInfo(ARGUMENTSINFO *ai) if (hContact == INVALID_CONTACT_ID) return nullptr; - BYTE type = getContactInfoType(ai->argv.w[2]); + uint8_t type = getContactInfoType(ai->argv.w[2]); if (type == 0) return nullptr; diff --git a/plugins/Variables/src/parse_system.cpp b/plugins/Variables/src/parse_system.cpp index ded98ec659..70604d5757 100644 --- a/plugins/Variables/src/parse_system.cpp +++ b/plugins/Variables/src/parse_system.cpp @@ -484,7 +484,7 @@ static wchar_t* parseRegistryValue(ARGUMENTSINFO *ai) return nullptr; memset(res, 0, (len * sizeof(wchar_t))); - int err = RegQueryValueEx(hKey, ai->argv.w[2], nullptr, &type, (BYTE*)res, &len); + int err = RegQueryValueEx(hKey, ai->argv.w[2], nullptr, &type, (uint8_t*)res, &len); if ((err != ERROR_SUCCESS) || (type != REG_SZ)) { RegCloseKey(hKey); mir_free(res); @@ -598,7 +598,7 @@ static wchar_t* parseTextFile(ARGUMENTSINFO *ai) DWORD readSz, totalReadSz; unsigned long linePos; wchar_t tUC, *res; - BYTE *pBuf, *pCur; + uint8_t *pBuf, *pCur; ReadFile(hFile, &tUC, sizeof(wchar_t), &readSz, nullptr); if (tUC != (wchar_t)0xFEFF) { tUC = 0; diff --git a/plugins/Variables/src/stdafx.h b/plugins/Variables/src/stdafx.h index 7aadeee69e..bb3e040e30 100644 --- a/plugins/Variables/src/stdafx.h +++ b/plugins/Variables/src/stdafx.h @@ -163,8 +163,8 @@ int getTokenRegisterCount(); int initTokenRegister(); int deinitTokenRegister(); // contact.c -BYTE getContactInfoType(wchar_t* type); -wchar_t* getContactInfoT(BYTE type, MCONTACT hContact); +uint8_t getContactInfoType(wchar_t* type); +wchar_t* getContactInfoT(uint8_t type, MCONTACT hContact); MCONTACT getContactFromString(const wchar_t *tszContact, DWORD dwFlags, int nMatch = 0); int initContactModule(); int deinitContactModule(); -- cgit v1.2.3