diff options
author | George Hazan <ghazan@miranda.im> | 2021-12-26 20:31:39 +0300 |
---|---|---|
committer | George Hazan <ghazan@miranda.im> | 2021-12-26 20:31:39 +0300 |
commit | cddcd7483a7c472598af098e759e5d309024f606 (patch) | |
tree | b0a227d6e087c41958cc84d27bc323353248aae5 /plugins/NotesAndReminders/src | |
parent | 1039b2829a264280493ba0fa979214fe024dc70c (diff) |
DWORD -> uint32_t
Diffstat (limited to 'plugins/NotesAndReminders/src')
-rw-r--r-- | plugins/NotesAndReminders/src/miscutils.cpp | 2 | ||||
-rw-r--r-- | plugins/NotesAndReminders/src/notes.cpp | 18 | ||||
-rw-r--r-- | plugins/NotesAndReminders/src/reminders.cpp | 22 |
3 files changed, 21 insertions, 21 deletions
diff --git a/plugins/NotesAndReminders/src/miscutils.cpp b/plugins/NotesAndReminders/src/miscutils.cpp index c03ae641d0..f7e41d3b6a 100644 --- a/plugins/NotesAndReminders/src/miscutils.cpp +++ b/plugins/NotesAndReminders/src/miscutils.cpp @@ -28,7 +28,7 @@ unsigned long WS_ResolveName(char *name, uint16_t *port, int defaultPort) free(nameCopy);
return *(u_long*)lk->h_addr_list[0];
}
- DWORD ret = inet_addr(nameCopy);
+ uint32_t ret = inet_addr(nameCopy);
free(nameCopy);
return ret;
}
diff --git a/plugins/NotesAndReminders/src/notes.cpp b/plugins/NotesAndReminders/src/notes.cpp index c267e4c3f7..d717730fb8 100644 --- a/plugins/NotesAndReminders/src/notes.cpp +++ b/plugins/NotesAndReminders/src/notes.cpp @@ -76,8 +76,8 @@ struct STICKYNOTE : public MZeroedObject ULONGLONG ID; // FILETIME in UTC wchar_t *pwszTitle; BOOL CustomTitle; - DWORD BgColor; // custom bg color override (only valid if non-zero) - DWORD FgColor; // custom fg/text color override (only valid if non-zero) + uint32_t BgColor; // custom bg color override (only valid if non-zero) + uint32_t FgColor; // custom fg/text color override (only valid if non-zero) STICKYNOTEFONT *pCustomFont;// custom (body) font override (NULL if default font is used) ~STICKYNOTE() @@ -102,9 +102,9 @@ static class CNotesListDlg *pListDialog; COLORREF GetCaptionColor(COLORREF bodyClr) { - const DWORD r = ((bodyClr & 0xff) * 4) / 5; - const DWORD g = (((bodyClr & 0xff00) * 4) / 5) & 0xff00; - const DWORD b = (((bodyClr & 0xff0000) * 4) / 5) & 0xff0000; + const uint32_t r = ((bodyClr & 0xff) * 4) / 5; + const uint32_t g = (((bodyClr & 0xff00) * 4) / 5) & 0xff00; + const uint32_t b = (((bodyClr & 0xff0000) * 4) / 5) & 0xff0000; return (COLORREF)(r | g | b); } @@ -261,7 +261,7 @@ static void JustSaveNotes(STICKYNOTE *pModified = nullptr) int TH = wp.rcNormalPosition.bottom - wp.rcNormalPosition.top; // set flags - DWORD flags = 0; + uint32_t flags = 0; if (pNote->bVisible) flags |= 1; if (pNote->bOnTop) flags |= 2; @@ -586,7 +586,7 @@ LRESULT CALLBACK StickyNoteWndProc(HWND hdlg, UINT message, WPARAM wParam, LPARA case WM_CREATE: { CREATESTRUCT *CS = (CREATESTRUCT *)lParam; - DWORD mystyle; + uint32_t mystyle; SN = (STICKYNOTE*)CS->lpCreateParams; SetPropA(hdlg, "ctrldata", (HANDLE)SN); @@ -1055,7 +1055,7 @@ static STICKYNOTE* NewNoteEx(int Ax, int Ay, int Aw, int Ah, const wchar_t *pwsz { WNDCLASSEX TWC = {0}; WINDOWPLACEMENT TWP; - DWORD L1, L2; + uint32_t L1, L2; SYSTEMTIME tm; const BOOL bIsStartup = bVisible & 0x10000; @@ -1206,7 +1206,7 @@ static void LoadNote(char *Value, bool bIsStartup) } BOOL bVisible = 0, bOnTop = 0; - DWORD flags = strtoul(TVal, nullptr, 16); + uint32_t flags = strtoul(TVal, nullptr, 16); if (flags & 1) bVisible = TRUE; if (flags & 2) diff --git a/plugins/NotesAndReminders/src/reminders.cpp b/plugins/NotesAndReminders/src/reminders.cpp index 36eb94843a..f047751a6b 100644 --- a/plugins/NotesAndReminders/src/reminders.cpp +++ b/plugins/NotesAndReminders/src/reminders.cpp @@ -20,7 +20,7 @@ static void RemoveReminderSystemEvent(struct REMINDERDATA *p); struct REMINDERDATA : public MZeroedObject
{
HWND handle;
- DWORD uid;
+ uint32_t uid;
CMStringW wszText;
ULONGLONG When; // FILETIME in UTC
UINT RepeatSound;
@@ -82,7 +82,7 @@ void TzLocalSTToFileTime(const SYSTEMTIME *tmLocal, FILETIME *lpUtc) SystemTimeToFileTime(&tm, lpUtc);
}
-static REMINDERDATA* FindReminder(DWORD uid)
+static REMINDERDATA* FindReminder(uint32_t uid)
{
for (auto &pReminder : arReminders)
if (pReminder->uid == uid)
@@ -98,13 +98,13 @@ static void InsertReminder(REMINDERDATA *p) arReminders.insert(p);
}
-static DWORD CreateUid()
+static uint32_t CreateUid()
{
if (!arReminders.getCount())
return 1;
// check existing reminders if uid is in use
- for (DWORD uid = 1;; uid++)
+ for (uint32_t uid = 1;; uid++)
if (!FindReminder(uid)) // uid in use
return uid;
}
@@ -359,9 +359,9 @@ static void Skin_PlaySoundPoly(LPCSTR pszSoundName) }
}
-static void UpdateReminderEvent(REMINDERDATA *pReminder, UINT nElapsedSeconds, DWORD *pHasPlayedSound)
+static void UpdateReminderEvent(REMINDERDATA *pReminder, UINT nElapsedSeconds, uint32_t *pHasPlayedSound)
{
- DWORD dwSoundMask;
+ uint32_t dwSoundMask;
if (pReminder->RepeatSound) {
if (nElapsedSeconds >= pReminder->RepeatSoundTTL) {
@@ -384,7 +384,7 @@ static void UpdateReminderEvent(REMINDERDATA *pReminder, UINT nElapsedSeconds, D }
}
-static void FireReminder(REMINDERDATA *pReminder, DWORD *pHasPlayedSound)
+static void FireReminder(REMINDERDATA *pReminder, uint32_t *pHasPlayedSound)
{
if (pReminder->bSystemEventQueued)
return;
@@ -404,7 +404,7 @@ static void FireReminder(REMINDERDATA *pReminder, DWORD *pHasPlayedSound) if (pReminder->SoundSel < 0) // sound disabled
return;
- DWORD dwSoundMask = 1 << pReminder->SoundSel;
+ uint32_t dwSoundMask = 1 << pReminder->SoundSel;
pReminder->RepeatSoundTTL = pReminder->RepeatSound;
@@ -738,7 +738,7 @@ protected: // tweak style of picker
if (IsWinVerVistaPlus()) {
- DWORD dw = m_date.SendMsg(DTM_GETMCSTYLE, 0, 0);
+ uint32_t dw = m_date.SendMsg(DTM_GETMCSTYLE, 0, 0);
dw |= MCS_WEEKNUMBERS | MCS_NOSELCHANGEONNAV;
m_date.SendMsg(DTM_SETMCSTYLE, 0, dw);
}
@@ -1267,7 +1267,7 @@ INT_PTR OpenTriggeredReminder(WPARAM, LPARAM l) l = ((CLISTEVENT*)l)->lParam;
- REMINDERDATA *pReminder = (REMINDERDATA*)FindReminder((DWORD)l);
+ REMINDERDATA *pReminder = (REMINDERDATA*)FindReminder((uint32_t)l);
if (!pReminder || !pReminder->bSystemEventQueued)
return 0;
@@ -1785,7 +1785,7 @@ bool CheckRemindersAndStart(void) bool bResult = false;
// var used to avoid playing multiple alarm sounds during a single update
- DWORD bHasPlayedSound = 0;
+ uint32_t bHasPlayedSound = 0;
// if there are queued (triggered) reminders then iterate through entire list, becaue of WM_TIMECHANGE events
// and for example daylight saving changes it's possible for an already triggered event to end up with When>curT
|