diff options
author | Goraf <22941576+Goraf@users.noreply.github.com> | 2017-11-13 15:03:31 +0100 |
---|---|---|
committer | Goraf <22941576+Goraf@users.noreply.github.com> | 2017-11-13 15:07:33 +0100 |
commit | a7c24ca48995cf2bf436156302f96b91bf135409 (patch) | |
tree | 953835509ff1b778833e78fd7b74b05e05e77c84 /plugins/HistoryStats/src/utils.cpp | |
parent | 591ec17b1c99db7f120c22ca9fb20ae05fe78325 (diff) |
Code modernize ...
* replace 0/NULL with nullptr [using clang-tidy]
Diffstat (limited to 'plugins/HistoryStats/src/utils.cpp')
-rw-r--r-- | plugins/HistoryStats/src/utils.cpp | 18 |
1 files changed, 9 insertions, 9 deletions
diff --git a/plugins/HistoryStats/src/utils.cpp b/plugins/HistoryStats/src/utils.cpp index 9c58288dfe..4e0a78400b 100644 --- a/plugins/HistoryStats/src/utils.cpp +++ b/plugins/HistoryStats/src/utils.cpp @@ -411,7 +411,7 @@ ext::a::string utils::convertWToA(const WCHAR* str, size_t len) {
char* buf = new char[len + 1];
- len = WideCharToMultiByte(CP_ACP, 0, str, len, buf, len, NULL, NULL);
+ len = WideCharToMultiByte(CP_ACP, 0, str, len, buf, len, nullptr, nullptr);
buf[len] = '\0';
@@ -759,7 +759,7 @@ bool utils::createPath(const ext::string& path) curPath += curDir;
- if (!CreateDirectory(curPath.c_str(), NULL)) {
+ if (!CreateDirectory(curPath.c_str(), nullptr)) {
return false;
}
@@ -848,7 +848,7 @@ void utils::centerDialog(HWND hDlg, HWND hParent /* = NULL */) if (GetWindowRect(hParent, &rParent) && GetWindowRect(hDlg, &rDlg)) {
SetWindowPos(
hDlg,
- 0,
+ nullptr,
(rParent.right + rParent.left - rDlg.right + rDlg.left) / 2,
(rParent.bottom + rParent.top - rDlg.bottom + rDlg.top) / 2,
0,
@@ -858,7 +858,7 @@ void utils::centerDialog(HWND hDlg, HWND hParent /* = NULL */) else if (GetWindowRect(hDlg, &rDlg)) {
SetWindowPos(
hDlg,
- 0,
+ nullptr,
(GetSystemMetrics(SM_CXSCREEN) - rDlg.right + rDlg.left) / 2,
(GetSystemMetrics(SM_CYSCREEN) - rDlg.bottom + rDlg.top) / 2,
0,
@@ -971,7 +971,7 @@ Locale Locale::m_Data; /*
* RTFFilter
*/
-RTFFilter::RTFFilter() : m_hRTFConv(NULL), m_RTFConvString(0)
+RTFFilter::RTFFilter() : m_hRTFConv(nullptr), m_RTFConvString(nullptr)
{
}
@@ -983,7 +983,7 @@ void RTFFilter::init() if (!(m_Data.m_RTFConvString = reinterpret_cast<RTFCONVSTRING>(GetProcAddress(m_Data.m_hRTFConv, "RtfconvString")))) {
FreeLibrary(m_Data.m_hRTFConv);
- m_Data.m_hRTFConv = NULL;
+ m_Data.m_hRTFConv = nullptr;
}
}
@@ -993,8 +993,8 @@ void RTFFilter::uninit() if (m_Data.m_hRTFConv) {
FreeLibrary(m_Data.m_hRTFConv);
- m_Data.m_hRTFConv = NULL;
- m_Data.m_RTFConvString = NULL;
+ m_Data.m_hRTFConv = nullptr;
+ m_Data.m_RTFConvString = nullptr;
}
}
@@ -1011,7 +1011,7 @@ ext::t::string RTFFilter::filter(const ext::t::string& str) intptr_t len = m_Data.m_RTFConvString(
strA.c_str(),
- NULL,
+ nullptr,
0,
CP_UNICODE,
CONVMODE_USE_SYSTEM_TABLE | CONVMODE_NO_OUTPUT_BOM,
|