summaryrefslogtreecommitdiff
path: root/plugins/NotesAndReminders/src/options.cpp
diff options
context:
space:
mode:
authorGoraf <22941576+Goraf@users.noreply.github.com>2017-11-13 15:03:31 +0100
committerGoraf <22941576+Goraf@users.noreply.github.com>2017-11-13 15:07:33 +0100
commita7c24ca48995cf2bf436156302f96b91bf135409 (patch)
tree953835509ff1b778833e78fd7b74b05e05e77c84 /plugins/NotesAndReminders/src/options.cpp
parent591ec17b1c99db7f120c22ca9fb20ae05fe78325 (diff)
Code modernize ...
* replace 0/NULL with nullptr [using clang-tidy]
Diffstat (limited to 'plugins/NotesAndReminders/src/options.cpp')
-rw-r--r--plugins/NotesAndReminders/src/options.cpp28
1 files changed, 14 insertions, 14 deletions
diff --git a/plugins/NotesAndReminders/src/options.cpp b/plugins/NotesAndReminders/src/options.cpp
index b1de471297..37773c7b03 100644
--- a/plugins/NotesAndReminders/src/options.cpp
+++ b/plugins/NotesAndReminders/src/options.cpp
@@ -7,19 +7,19 @@ extern HANDLE hkFontChange;
extern HANDLE hkColorChange;
BOOL g_CloseAfterAddReminder, g_UseDefaultPlaySound;
-HICON g_hReminderIcon = NULL;
+HICON g_hReminderIcon = nullptr;
LOGFONT lfBody,lfCaption;
-HFONT hBodyFont = NULL, hCaptionFont = NULL;
+HFONT hBodyFont = nullptr, hCaptionFont = nullptr;
long BodyColor;
long CaptionFontColor,BodyFontColor;
BOOL g_ShowNotesAtStart,g_ShowScrollbar,g_AddContListMI,g_ShowNoteButtons;
int g_NoteTitleDate, g_NoteTitleTime;
int g_NoteWidth,g_NoteHeight;
int g_Transparency;
-char *g_RemindSMS = NULL;
+char *g_RemindSMS = nullptr;
-char *g_lpszAltBrowser = NULL;
+char *g_lpszAltBrowser = nullptr;
int g_reminderListGeom[4] = {0};
int g_reminderListColGeom[2] = { 150, 205 };
@@ -169,9 +169,9 @@ static BYTE MsgDlgGetFontDefaultCharset(const char *szFont)
lf.lfCharSet = MsgDlgGetCPDefaultCharset();
// check if the font supports specified charset
- HDC hdc = GetDC(0);
+ HDC hdc = GetDC(nullptr);
EnumFontFamiliesEx(hdc, &lf, &EnumFontFamExProc, (LPARAM)&found, 0);
- ReleaseDC(0, hdc);
+ ReleaseDC(nullptr, hdc);
if (found)
return lf.lfCharSet;
@@ -234,9 +234,9 @@ void RegisterFontServiceFonts()
strncpy(fontid.dbSettingsGroup, MODULENAME, _countof(fontid.dbSettingsGroup));
fontid.flags = FIDF_ALLOWREREGISTER | FIDF_DEFAULTVALID | FIDF_SAVEPOINTSIZE;
- HDC hDC = GetDC(NULL);
+ HDC hDC = GetDC(nullptr);
int nFontScale = GetDeviceCaps(hDC, LOGPIXELSY);
- ReleaseDC(NULL, hDC);
+ ReleaseDC(nullptr, hDC);
for (int i = 0; i < _countof(fontOptionsList); i++) {
fontid.order = i;
@@ -397,12 +397,12 @@ INT_PTR CALLBACK DlgProcOptions(HWND hdlg, UINT message, WPARAM wParam, LPARAM l
TrimString(g_lpszAltBrowser);
if (!*g_lpszAltBrowser) {
mir_free(g_lpszAltBrowser);
- g_lpszAltBrowser = NULL;
+ g_lpszAltBrowser = nullptr;
}
}
else if (g_lpszAltBrowser) {
mir_free(g_lpszAltBrowser);
- g_lpszAltBrowser = NULL;
+ g_lpszAltBrowser = nullptr;
}
SetDlgItemText(hdlg, IDC_EDIT_ALTBROWSER, g_lpszAltBrowser ? g_lpszAltBrowser : "");
if (g_lpszAltBrowser)
@@ -457,7 +457,7 @@ INT_PTR CALLBACK DlgProcOptions(HWND hdlg, UINT message, WPARAM wParam, LPARAM l
SetDlgItemText(hdlg, IDC_EDIT_EMAILSMS, "");
if (g_lpszAltBrowser) {
mir_free(g_lpszAltBrowser);
- g_lpszAltBrowser = NULL;
+ g_lpszAltBrowser = nullptr;
}
SetDlgItemText(hdlg, IDC_EDIT_ALTBROWSER, "");
g_ShowNotesAtStart = TRUE;
@@ -515,12 +515,12 @@ INT_PTR CALLBACK DlgProcOptions(HWND hdlg, UINT message, WPARAM wParam, LPARAM l
void InitSettings(void)
{
- void *P = NULL;
+ void *P = nullptr;
short Sz1 = MAX_PATH;
ReadSettingBlob(0, MODULENAME, "RemindEmail", (WORD*)&Sz1, &P);
if (!(Sz1 && P))
- g_RemindSMS = NULL;
+ g_RemindSMS = nullptr;
else {
g_RemindSMS = (char*)malloc(Sz1 + 1);
memcpy(g_RemindSMS, P, Sz1);
@@ -572,6 +572,6 @@ void TermSettings(void)
if (g_lpszAltBrowser) {
mir_free(g_lpszAltBrowser);
- g_lpszAltBrowser = NULL;
+ g_lpszAltBrowser = nullptr;
}
}