summaryrefslogtreecommitdiff
path: root/plugins/NotesAndReminders/src/reminders.cpp
diff options
context:
space:
mode:
authorGeorge Hazan <ghazan@miranda.im>2021-12-26 20:31:39 +0300
committerGeorge Hazan <ghazan@miranda.im>2021-12-26 20:31:39 +0300
commitcddcd7483a7c472598af098e759e5d309024f606 (patch)
treeb0a227d6e087c41958cc84d27bc323353248aae5 /plugins/NotesAndReminders/src/reminders.cpp
parent1039b2829a264280493ba0fa979214fe024dc70c (diff)
DWORD -> uint32_t
Diffstat (limited to 'plugins/NotesAndReminders/src/reminders.cpp')
-rw-r--r--plugins/NotesAndReminders/src/reminders.cpp22
1 files changed, 11 insertions, 11 deletions
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