diff options
author | George Hazan <ghazan@miranda.im> | 2021-12-26 17:06:04 +0300 |
---|---|---|
committer | George Hazan <ghazan@miranda.im> | 2021-12-26 17:06:04 +0300 |
commit | 1039b2829a264280493ba0fa979214fe024dc70c (patch) | |
tree | 8fa6a60eb46627582c372b56a4a1d4754d6732c3 /plugins/SeenPlugin/src | |
parent | 62a186697df33c96dc1a6dac0f4dfc38652fb96f (diff) |
WORD -> uint16_t
Diffstat (limited to 'plugins/SeenPlugin/src')
-rw-r--r-- | plugins/SeenPlugin/src/missed.cpp | 2 | ||||
-rw-r--r-- | plugins/SeenPlugin/src/options.cpp | 4 | ||||
-rw-r--r-- | plugins/SeenPlugin/src/stdafx.h | 2 | ||||
-rw-r--r-- | plugins/SeenPlugin/src/utils.cpp | 20 |
4 files changed, 14 insertions, 14 deletions
diff --git a/plugins/SeenPlugin/src/missed.cpp b/plugins/SeenPlugin/src/missed.cpp index ed5858e88f..9e4b4efeaf 100644 --- a/plugins/SeenPlugin/src/missed.cpp +++ b/plugins/SeenPlugin/src/missed.cpp @@ -132,7 +132,7 @@ int Test(WPARAM wparam, LPARAM lparam) switch (lparam) {
case ICON_OFFLINE:
if (g_plugin.getByte((MCONTACT)wparam, "Missed", 0) == 1) {
- WORD missed = IsUserMissed(wparam);
+ uint16_t missed = IsUserMissed(wparam);
if (!LOWORD(missed)) {
mcs.times[mcs.count] = 1;
mcs.wpcontact[mcs.count++] = wparam;
diff --git a/plugins/SeenPlugin/src/options.cpp b/plugins/SeenPlugin/src/options.cpp index 4ba368a2df..01b8237256 100644 --- a/plugins/SeenPlugin/src/options.cpp +++ b/plugins/SeenPlugin/src/options.cpp @@ -152,7 +152,7 @@ public: LRESULT OnCommand(UINT, WPARAM wParam, LPARAM)
{
if (HIWORD(wParam) == CPN_COLOURCHANGED) {
- WORD idText, idBack;
+ uint16_t idText, idBack;
if (LOWORD(wParam) > ID_STATUS_MAX) // we have clicked a text color
idText = wParam, idBack = wParam - 20;
else
@@ -293,7 +293,7 @@ public: GetDlgItemText(m_hwnd, IDC_HISTORYSTAMP, szstamp, _countof(szstamp));
g_plugin.setWString("HistoryStamp", szstamp);
- g_plugin.setWord("HistoryMax", (WORD)(GetDlgItemInt(m_hwnd, IDC_HISTORYSIZE, nullptr, FALSE) + 1));
+ g_plugin.setWord("HistoryMax", (uint16_t)(GetDlgItemInt(m_hwnd, IDC_HISTORYSIZE, nullptr, FALSE) + 1));
if (chkMenuItem.IsChanged()) {
bool bchecked = chkMenuItem.GetState();
diff --git a/plugins/SeenPlugin/src/stdafx.h b/plugins/SeenPlugin/src/stdafx.h index 5c48418d44..167289d503 100644 --- a/plugins/SeenPlugin/src/stdafx.h +++ b/plugins/SeenPlugin/src/stdafx.h @@ -126,7 +126,7 @@ struct logthread_info {
MCONTACT hContact;
char sProtoName[MAXMODULELABELLENGTH];
- WORD currStatus;
+ uint16_t currStatus;
};
extern DWORD StatusColors15bits[];
diff --git a/plugins/SeenPlugin/src/utils.cpp b/plugins/SeenPlugin/src/utils.cpp index 53014d3ef1..45d47447ad 100644 --- a/plugins/SeenPlugin/src/utils.cpp +++ b/plugins/SeenPlugin/src/utils.cpp @@ -346,15 +346,15 @@ void DBWriteTimeTS(DWORD t, MCONTACT hcontact) void GetColorsFromDWord(LPCOLORREF First, LPCOLORREF Second, DWORD colDword)
{
- WORD temp;
+ uint16_t temp;
COLORREF res = 0;
- temp = (WORD)(colDword >> 16);
+ temp = (uint16_t)(colDword >> 16);
res |= ((temp & 0x1F) << 3);
res |= ((temp & 0x3E0) << 6);
res |= ((temp & 0x7C00) << 9);
if (First) *First = res;
res = 0;
- temp = (WORD)colDword;
+ temp = (uint16_t)colDword;
res |= ((temp & 0x1F) << 3);
res |= ((temp & 0x3E0) << 6);
res |= ((temp & 0x7C00) << 9);
@@ -426,7 +426,7 @@ void ShowPopup(MCONTACT hcontact, const char * lpzProto, int newStatus) PUAddPopupW(&ppd);
}
-void myPlaySound(MCONTACT hcontact, WORD newStatus, WORD oldStatus)
+void myPlaySound(MCONTACT hcontact, uint16_t newStatus, uint16_t oldStatus)
{
if (Ignore_IsIgnored(hcontact, IGNOREEVENT_USERONLINE))
return;
@@ -446,7 +446,7 @@ static void waitThread(logthread_info* infoParam) {
Thread_SetName("SeenPlugin: waitThread");
- WORD prevStatus = g_plugin.getWord(infoParam->hContact, "StatusTriger", ID_STATUS_OFFLINE);
+ uint16_t prevStatus = g_plugin.getWord(infoParam->hContact, "StatusTriger", ID_STATUS_OFFLINE);
// I hope in 1.5 second all the needed info will be set
if (WaitForSingleObject(g_hShutdownEvent, 1500) == WAIT_TIMEOUT) {
@@ -455,7 +455,7 @@ static void waitThread(logthread_info* infoParam) infoParam->currStatus &= 0x7FFF;
if (infoParam->currStatus != prevStatus) {
- g_plugin.setWord(infoParam->hContact, "OldStatus", (WORD)(prevStatus | 0x8000));
+ g_plugin.setWord(infoParam->hContact, "OldStatus", (uint16_t)(prevStatus | 0x8000));
if (includeIdle)
g_plugin.setByte(infoParam->hContact, "OldIdle", (uint8_t)((prevStatus & 0x8000) == 0));
@@ -493,7 +493,7 @@ int UpdateValues(WPARAM hContact, LPARAM lparam) if (!strcmp(cws->szModule, MODULENAME)) {
// here we will come when Settings/SeenModule/StatusTriger is changed
- WORD prevStatus = g_plugin.getWord(hContact, "OldStatus", ID_STATUS_OFFLINE);
+ uint16_t prevStatus = g_plugin.getWord(hContact, "OldStatus", ID_STATUS_OFFLINE);
if (includeIdle) {
if (g_plugin.getByte(hContact, "OldIdle", 0))
prevStatus &= 0x7FFF;
@@ -583,10 +583,10 @@ static void cleanThread(logthread_info* infoParam) // I hope in 10 secons all logged-in contacts will be listed
if (WaitForSingleObject(g_hShutdownEvent, 10000) == WAIT_TIMEOUT) {
for (auto &hContact : Contacts(szProto)) {
- WORD oldStatus = g_plugin.getWord(hContact, "StatusTriger", ID_STATUS_OFFLINE) | 0x8000;
+ uint16_t oldStatus = g_plugin.getWord(hContact, "StatusTriger", ID_STATUS_OFFLINE) | 0x8000;
if (oldStatus > ID_STATUS_OFFLINE) {
if (db_get_w(hContact, szProto, "Status", ID_STATUS_OFFLINE) == ID_STATUS_OFFLINE) {
- g_plugin.setWord(hContact, "OldStatus", (WORD)(oldStatus | 0x8000));
+ g_plugin.setWord(hContact, "OldStatus", (uint16_t)(oldStatus | 0x8000));
if (includeIdle)
g_plugin.setByte(hContact, "OldIdle", (uint8_t)((oldStatus & 0x8000) ? 0 : 1));
g_plugin.setWord(hContact, "StatusTriger", ID_STATUS_OFFLINE);
@@ -612,7 +612,7 @@ int ModeChange(WPARAM, LPARAM lparam) DBWriteTimeTS(time(0), NULL);
- WORD isetting = (WORD)ack->lParam;
+ uint16_t isetting = (uint16_t)ack->lParam;
if (isetting < ID_STATUS_OFFLINE)
isetting = ID_STATUS_OFFLINE;
if ((isetting > ID_STATUS_OFFLINE) && ((UINT_PTR)ack->hProcess <= ID_STATUS_OFFLINE)) {
|