summaryrefslogtreecommitdiff
path: root/plugins/Spamotron/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/Spamotron/src/options.cpp
parent591ec17b1c99db7f120c22ca9fb20ae05fe78325 (diff)
Code modernize ...
* replace 0/NULL with nullptr [using clang-tidy]
Diffstat (limited to 'plugins/Spamotron/src/options.cpp')
-rw-r--r--plugins/Spamotron/src/options.cpp8
1 files changed, 4 insertions, 4 deletions
diff --git a/plugins/Spamotron/src/options.cpp b/plugins/Spamotron/src/options.cpp
index 1c528f9d52..f4d4733a49 100644
--- a/plugins/Spamotron/src/options.cpp
+++ b/plugins/Spamotron/src/options.cpp
@@ -83,7 +83,7 @@ BOOL _saveDlgItemScore(HWND hDialog, int controlID, char* option)
len = GetWindowTextLength(GetDlgItem(hDialog, controlID));
tmp = (wchar_t *)malloc((len + 1)*sizeof(wchar_t));
GetDlgItemText(hDialog, controlID, tmp, len + 1);
- _setOptD(option, wcstod(tmp, NULL)/SCORE_C);
+ _setOptD(option, wcstod(tmp, nullptr)/SCORE_C);
return TRUE;
}
@@ -374,7 +374,7 @@ INT_PTR CALLBACK DlgProcOptionsQuestion(HWND optDlg, UINT msg, WPARAM wParam, LP
break;
}
if (_saveDlgItemResponse(optDlg, IDC_OPT_RESPONSE, "Response") == -1) {
- MessageBox(NULL, TranslateT("Invalid regular expression.\nKeeping previous value."), L"Error", MB_OK);
+ MessageBox(nullptr, TranslateT("Invalid regular expression.\nKeeping previous value."), L"Error", MB_OK);
return FALSE;
}
_saveDlgItemText(optDlg, IDC_OPT_SUCCESS_RESPONSE, "SuccessResponse");
@@ -521,7 +521,7 @@ INT_PTR CALLBACK DlgProcOptionsBayes(HWND optDlg, UINT msg, WPARAM wParam, LPARA
GetDlgItemText(optDlg, IDC_OPT_BAYES_LEARNBOX, dbuf, len);
mir_snprintf(cbuf, "%0.04f", get_msg_score(dbuf));
SetDlgItemText(optDlg, IDC_OPT_BAYES_LEARNBOX, L"");
- MessageBoxA(NULL, cbuf, Translate("Message score"), MB_OK);
+ MessageBoxA(nullptr, cbuf, Translate("Message score"), MB_OK);
free(dbuf);
return FALSE;
@@ -579,7 +579,7 @@ int OnOptInitialize(WPARAM wParam, LPARAM)
odp.pszTemplate = MAKEINTRESOURCEA(IDD_SPAMOTRON_POPUPS);
odp.pfnDlgProc = DlgProcOptionsPopups;
odp.szGroup.a = LPGEN("Popups");
- odp.szTab.a = NULL;
+ odp.szTab.a = nullptr;
Options_AddPage(wParam, &odp);
}
return 0;