summaryrefslogtreecommitdiff
path: root/plugins/HistoryStats
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/HistoryStats
parent591ec17b1c99db7f120c22ca9fb20ae05fe78325 (diff)
Code modernize ...
* replace 0/NULL with nullptr [using clang-tidy]
Diffstat (limited to 'plugins/HistoryStats')
-rw-r--r--plugins/HistoryStats/src/bandctrlimpl.cpp74
-rw-r--r--plugins/HistoryStats/src/canvas.cpp14
-rw-r--r--plugins/HistoryStats/src/colbase_words.cpp6
-rw-r--r--plugins/HistoryStats/src/column.cpp4
-rw-r--r--plugins/HistoryStats/src/column_chatduration.cpp6
-rw-r--r--plugins/HistoryStats/src/column_events.cpp2
-rw-r--r--plugins/HistoryStats/src/column_inout.cpp6
-rw-r--r--plugins/HistoryStats/src/column_inoutgraph.cpp14
-rw-r--r--plugins/HistoryStats/src/column_nick.cpp4
-rw-r--r--plugins/HistoryStats/src/column_split.cpp14
-rw-r--r--plugins/HistoryStats/src/column_splittimeline.cpp16
-rw-r--r--plugins/HistoryStats/src/column_timeline.cpp14
-rw-r--r--plugins/HistoryStats/src/column_wordcount.cpp8
-rw-r--r--plugins/HistoryStats/src/column_words.cpp18
-rw-r--r--plugins/HistoryStats/src/contact.cpp2
-rw-r--r--plugins/HistoryStats/src/dlgconfigure.cpp12
-rw-r--r--plugins/HistoryStats/src/dlgfilterwords.cpp10
-rw-r--r--plugins/HistoryStats/src/dlgoption.cpp10
-rw-r--r--plugins/HistoryStats/src/dlgoption_subbase.cpp2
-rw-r--r--plugins/HistoryStats/src/dlgoption_subcolumns.cpp40
-rw-r--r--plugins/HistoryStats/src/dlgoption_subexclude.cpp4
-rw-r--r--plugins/HistoryStats/src/dlgoption_subglobal.cpp34
-rw-r--r--plugins/HistoryStats/src/dlgoption_subinput.cpp40
-rw-r--r--plugins/HistoryStats/src/dlgoption_suboutput.cpp78
-rw-r--r--plugins/HistoryStats/src/iconlib.cpp18
-rw-r--r--plugins/HistoryStats/src/main.cpp30
-rw-r--r--plugins/HistoryStats/src/mirandacontact.cpp12
-rw-r--r--plugins/HistoryStats/src/mu_common.cpp22
-rw-r--r--plugins/HistoryStats/src/optionsctrlimpl.cpp54
-rw-r--r--plugins/HistoryStats/src/optionsctrlimpl_button.cpp8
-rw-r--r--plugins/HistoryStats/src/optionsctrlimpl_color.cpp10
-rw-r--r--plugins/HistoryStats/src/optionsctrlimpl_combo.cpp8
-rw-r--r--plugins/HistoryStats/src/optionsctrlimpl_datetime.cpp8
-rw-r--r--plugins/HistoryStats/src/optionsctrlimpl_edit.cpp8
-rw-r--r--plugins/HistoryStats/src/optionsctrlimpl_item.cpp2
-rw-r--r--plugins/HistoryStats/src/settings.cpp8
-rw-r--r--plugins/HistoryStats/src/settingstree.cpp8
-rw-r--r--plugins/HistoryStats/src/statistic.cpp86
-rw-r--r--plugins/HistoryStats/src/utils.cpp18
39 files changed, 366 insertions, 366 deletions
diff --git a/plugins/HistoryStats/src/bandctrlimpl.cpp b/plugins/HistoryStats/src/bandctrlimpl.cpp
index 0bd72c9e5a..4ecbe3932d 100644
--- a/plugins/HistoryStats/src/bandctrlimpl.cpp
+++ b/plugins/HistoryStats/src/bandctrlimpl.cpp
@@ -37,12 +37,12 @@ LRESULT CALLBACK BandCtrlImpl::staticWndProc(HWND hWnd, UINT msg, WPARAM wParam,
case WM_KILLFOCUS:
if (pCtrl->m_nCurFocused != -1) {
pCtrl->m_nCurFocused = -1;
- InvalidateRect(pCtrl->m_hWnd, NULL, TRUE);
+ InvalidateRect(pCtrl->m_hWnd, nullptr, TRUE);
}
return 0;
case WM_ENABLE:
- InvalidateRect(pCtrl->m_hWnd, NULL, TRUE);
+ InvalidateRect(pCtrl->m_hWnd, nullptr, TRUE);
return 0;
case WM_GETFONT:
@@ -54,7 +54,7 @@ LRESULT CALLBACK BandCtrlImpl::staticWndProc(HWND hWnd, UINT msg, WPARAM wParam,
case WM_WINDOWPOSCHANGED:
pCtrl->recalcButtonRects();
- InvalidateRect(pCtrl->m_hWnd, NULL, TRUE);
+ InvalidateRect(pCtrl->m_hWnd, nullptr, TRUE);
return 0;
case WM_KEYDOWN:
@@ -139,7 +139,7 @@ LRESULT CALLBACK BandCtrlImpl::staticWndProc(HWND hWnd, UINT msg, WPARAM wParam,
assert(static_cast<int>(wParam) >= 0);
pCtrl->m_nLayout = wParam;
pCtrl->recalcButtonRects();
- InvalidateRect(pCtrl->m_hWnd, NULL, TRUE);
+ InvalidateRect(pCtrl->m_hWnd, nullptr, TRUE);
return 0;
case BCM_GETBUTTONRECT:
@@ -167,12 +167,12 @@ bool BandCtrlImpl::registerClass()
0, // cbClsExtra
sizeof(BandCtrlImpl*), // cbWndExtra
g_hInst, // hInstance
- NULL, // hIcon
- NULL, // hCursor
- NULL, // hbrBackground
- NULL, // lpszMenuName
+ nullptr, // hIcon
+ nullptr, // hCursor
+ nullptr, // hbrBackground
+ nullptr, // lpszMenuName
m_ClassName, // lpszClassName
- NULL // hIconSm
+ nullptr // hIconSm
};
if (!RegisterClassEx(&wcx))
@@ -187,10 +187,10 @@ void BandCtrlImpl::unregisterClass()
}
BandCtrlImpl::BandCtrlImpl(HWND hWnd, UINT_PTR nOwnId) :
- m_hWnd(hWnd), m_nOwnId(nOwnId), m_hFont(NULL),
- m_hTheme(NULL), m_hImageList(NULL), m_hImageListD(NULL), m_hTooltip(NULL),
+ m_hWnd(hWnd), m_nOwnId(nOwnId), m_hFont(nullptr),
+ m_hTheme(nullptr), m_hImageList(nullptr), m_hImageListD(nullptr), m_hTooltip(nullptr),
m_nCurHot(-1), m_nCurFocused(-1), m_nCurPressed(-1), m_bCurPressedDD(false),
- m_nLayout(0), m_nDDWidth(12), m_hDDIcon(NULL)
+ m_nLayout(0), m_nDDWidth(12), m_hDDIcon(nullptr)
{
m_IconSize.cx = m_IconSize.cy;
m_hDDIcon = reinterpret_cast<HICON>(LoadImage(g_hInst, MAKEINTRESOURCE(IDI_DROPDOWN), IMAGE_ICON, OS::smIconCX(), OS::smIconCY(), 0));
@@ -202,22 +202,22 @@ BandCtrlImpl::~BandCtrlImpl()
{
if (m_hTooltip) {
DestroyWindow(m_hTooltip);
- m_hTooltip = NULL;
+ m_hTooltip = nullptr;
}
if (m_hImageList) {
ImageList_Destroy(m_hImageList);
- m_hImageList = NULL;
+ m_hImageList = nullptr;
}
if (m_hImageListD) {
ImageList_Destroy(m_hImageListD);
- m_hImageListD = NULL;
+ m_hImageListD = nullptr;
}
if (m_hTheme) {
CloseThemeData(m_hTheme);
- m_hTheme = NULL;
+ m_hTheme = nullptr;
}
if (m_hDDIcon) {
@@ -231,7 +231,7 @@ void BandCtrlImpl::onWMPaint()
// start painting
PAINTSTRUCT ps;
HDC hRealDC = BeginPaint(m_hWnd, &ps);
- if (hRealDC == NULL)
+ if (hRealDC == nullptr)
return;
// get rect for painting
@@ -242,23 +242,23 @@ void BandCtrlImpl::onWMPaint()
HDC hDC = CreateCompatibleDC(hRealDC);
HBITMAP hMemBitmap = CreateCompatibleBitmap(hRealDC, ps.rcPaint.right - ps.rcPaint.left, ps.rcPaint.bottom - ps.rcPaint.top);
HBITMAP hOldBitmap = reinterpret_cast<HBITMAP>(SelectObject(hDC, hMemBitmap));
- SetWindowOrgEx(hDC, ps.rcPaint.left, ps.rcPaint.top, NULL);
+ SetWindowOrgEx(hDC, ps.rcPaint.left, ps.rcPaint.top, nullptr);
// fill background
bool bBandEnabled = bool_(IsWindowEnabled(m_hWnd));
SetBkColor(hDC, GetSysColor(bBandEnabled ? COLOR_WINDOW : COLOR_BTNFACE));
- ExtTextOut(hDC, 0, 0, ETO_OPAQUE, &rOut, NULL, 0, NULL);
+ ExtTextOut(hDC, 0, 0, ETO_OPAQUE, &rOut, nullptr, 0, nullptr);
// draw top and bottom line
if (bBandEnabled) {
RECT rLine = { rOut.left, rOut.top, rOut.right, rOut.top + 1 };
SetBkColor(hDC, GetSysColor(COLOR_3DSHADOW));
- ExtTextOut(hDC, 0, 0, ETO_OPAQUE, &rLine, NULL, 0, NULL);
+ ExtTextOut(hDC, 0, 0, ETO_OPAQUE, &rLine, nullptr, 0, nullptr);
rLine.top = (rLine.bottom = rOut.bottom) - 1;
- ExtTextOut(hDC, 0, 0, ETO_OPAQUE, &rLine, NULL, 0, NULL);
+ ExtTextOut(hDC, 0, 0, ETO_OPAQUE, &rLine, nullptr, 0, nullptr);
}
// draw items
@@ -315,7 +315,7 @@ void BandCtrlImpl::drawButton(HDC hDC, int nItem, int textHeight, bool bBandEnab
if (bEnabled)
state = bPressed ? (m_bCurPressedDD ? TS_PRESSED : TS_HOT) : (item.bChecked ? (bHot ? TS_HOTCHECKED : TS_CHECKED) : (bHot ? TS_HOT : TS_NORMAL));
- DrawThemeBackground(m_hTheme, hDC, TP_SPLITBUTTONDROPDOWN, state, &rDropDown, NULL);
+ DrawThemeBackground(m_hTheme, hDC, TP_SPLITBUTTONDROPDOWN, state, &rDropDown, nullptr);
}
else {
--rDropDown.left;
@@ -331,7 +331,7 @@ void BandCtrlImpl::drawButton(HDC hDC, int nItem, int textHeight, bool bBandEnab
int x = rDropDown.left + (rDropDown.right - rDropDown.left - OS::smIconCX()) / 2;
int y = rDropDown.top + (rDropDown.bottom - rDropDown.top - OS::smIconCY()) / 2;
- DrawState(hDC, NULL, NULL, reinterpret_cast<LPARAM>(m_hDDIcon), 0, x, y, m_IconSize.cx, m_IconSize.cy, DST_ICON | (bEnabled ? 0 : DSS_DISABLED));
+ DrawState(hDC, nullptr, nullptr, reinterpret_cast<LPARAM>(m_hDDIcon), 0, x, y, m_IconSize.cx, m_IconSize.cy, DST_ICON | (bEnabled ? 0 : DSS_DISABLED));
}
}
@@ -342,7 +342,7 @@ void BandCtrlImpl::drawButton(HDC hDC, int nItem, int textHeight, bool bBandEnab
if (bEnabled)
state = bPressed ? (!m_bCurPressedDD ? TS_PRESSED : TS_HOT) : (item.bChecked ? (bHot ? TS_HOTCHECKED : TS_CHECKED) : (bHot ? TS_HOT : TS_NORMAL));
- DrawThemeBackground(m_hTheme, hDC, part, state, &rItem, NULL);
+ DrawThemeBackground(m_hTheme, hDC, part, state, &rItem, nullptr);
}
else {
UINT state = 0;
@@ -379,7 +379,7 @@ void BandCtrlImpl::drawButton(HDC hDC, int nItem, int textHeight, bool bBandEnab
ImageList_Draw(m_hImageListD, item.nIconD, hDC, x, y, ILD_NORMAL);
else {
HICON hIcon = ImageList_GetIcon(m_hImageList, item.nIcon, 0);
- DrawState(hDC, NULL, NULL, reinterpret_cast<LPARAM>(hIcon), 0, x, y, m_IconSize.cx, m_IconSize.cy, DST_ICON | DSS_DISABLED);
+ DrawState(hDC, nullptr, nullptr, reinterpret_cast<LPARAM>(hIcon), 0, x, y, m_IconSize.cx, m_IconSize.cy, DST_ICON | DSS_DISABLED);
DestroyIcon(hIcon);
}
}
@@ -396,12 +396,12 @@ void BandCtrlImpl::reloadTheme()
{
if (m_hTheme) {
CloseThemeData(m_hTheme);
- m_hTheme = NULL;
+ m_hTheme = nullptr;
}
m_nDDWidth = 12;
- m_hTheme = OpenThemeData(0, L"TOOLBAR");
+ m_hTheme = OpenThemeData(nullptr, L"TOOLBAR");
recalcButtonRects();
}
@@ -411,11 +411,11 @@ HICON BandCtrlImpl::convertToGray(HICON hIcon)
// preserves transparency
// works only for 32bit icons
- HICON hIconDisabled = NULL;
+ HICON hIconDisabled = nullptr;
ICONINFO ii;
if (!GetIconInfo(hIcon, &ii))
- return NULL;
+ return nullptr;
BITMAP bmp;
if (GetObject(ii.hbmColor, sizeof(bmp), &bmp) && bmp.bmBitsPixel == 32) {
@@ -536,7 +536,7 @@ void BandCtrlImpl::onBCMShowButton(int nItem, bool bShow)
if (bShow != id.bVisible) {
id.bVisible = bShow;
recalcButtonRects();
- InvalidateRect(m_hWnd, NULL, TRUE);
+ InvalidateRect(m_hWnd, nullptr, TRUE);
}
}
@@ -556,7 +556,7 @@ void BandCtrlImpl::onBCMEnableButton(int nItem, bool bEnable)
if (bEnable != id.bEnabled) {
id.bEnabled = bEnable;
- InvalidateRect(m_hWnd, NULL, TRUE);
+ InvalidateRect(m_hWnd, nullptr, TRUE);
}
}
@@ -603,7 +603,7 @@ void BandCtrlImpl::recalcButtonRects()
m_hWnd, // hwnd
m_Items[i].uTTId, // uId
m_Items[i].rItem, // rect
- NULL, // hInstance
+ nullptr, // hInstance
const_cast<wchar_t*>(m_Items[i].tooltip.c_str()), // lpszText
};
@@ -622,9 +622,9 @@ void BandCtrlImpl::recalcButtonRects()
else if (m_Items[i].uTTId == -1 && m_Items[i].bVisible && !m_Items[i].tooltip.empty()) {
// add a tooltip, if we don't have a tooltip but are now visible
if (!m_hTooltip)
- m_hTooltip = CreateWindowEx(WS_EX_TOPMOST, TOOLTIPS_CLASS, L"", WS_POPUP, 0, 0, 0, 0, NULL, NULL, g_hInst, NULL);
+ m_hTooltip = CreateWindowEx(WS_EX_TOPMOST, TOOLTIPS_CLASS, L"", WS_POPUP, 0, 0, 0, 0, nullptr, nullptr, g_hInst, nullptr);
- TOOLINFO ti = { sizeof(TOOLINFO), TTF_SUBCLASS, m_hWnd, UINT_PTR(i+1), m_Items[i].rItem, NULL,
+ TOOLINFO ti = { sizeof(TOOLINFO), TTF_SUBCLASS, m_hWnd, UINT_PTR(i+1), m_Items[i].rItem, nullptr,
const_cast<wchar_t*>(m_Items[i].tooltip.c_str()), // lpszText
};
@@ -740,7 +740,7 @@ void BandCtrlImpl::onWMKeyDown(int nVirtKey)
if (nNext != -1 && nNext != m_nCurFocused) {
m_nCurFocused = nNext;
- InvalidateRect(m_hWnd, NULL, TRUE);
+ InvalidateRect(m_hWnd, nullptr, TRUE);
}
}
else if (nVirtKey == VK_LEFT) {
@@ -748,7 +748,7 @@ void BandCtrlImpl::onWMKeyDown(int nVirtKey)
if (nPrev != -1 && nPrev != m_nCurFocused) {
m_nCurFocused = nPrev;
- InvalidateRect(m_hWnd, NULL, TRUE);
+ InvalidateRect(m_hWnd, nullptr, TRUE);
}
}
else if (nVirtKey == VK_SPACE) {
@@ -821,7 +821,7 @@ void BandCtrlImpl::onWMMouseMove(POINTS pts)
}
if (m_nCurHot != -1) {
- SetTimer(m_hWnd, m_PollId, m_PollDelay, NULL);
+ SetTimer(m_hWnd, m_PollId, m_PollDelay, nullptr);
}
}
diff --git a/plugins/HistoryStats/src/canvas.cpp b/plugins/HistoryStats/src/canvas.cpp
index 945b22351b..215f631104 100644
--- a/plugins/HistoryStats/src/canvas.cpp
+++ b/plugins/HistoryStats/src/canvas.cpp
@@ -31,8 +31,8 @@ void Canvas::updateTrans(BYTE* pData)
Canvas::Canvas(int nWidth, int nHeight) : m_nChannels(4), m_nWidth(nWidth),
m_nHeight(nHeight), m_nLineLength((m_nChannels * m_nWidth + 3) & ~0x3),
- m_bTransColor(false), m_TransColor(0), m_pBMIH(NULL), m_hDC(0),
- m_hBmp(0), m_hOldBmp(0)
+ m_bTransColor(false), m_TransColor(0), m_pBMIH(nullptr), m_hDC(nullptr),
+ m_hBmp(nullptr), m_hOldBmp(nullptr)
{}
Canvas::~Canvas()
@@ -65,7 +65,7 @@ void Canvas::fillBackground(COLORREF bkColor)
RECT rAll = { 0, 0, m_nWidth, m_nHeight };
SetBkColor(hDC, bkColor);
- ExtTextOut(hDC, 0, 0, ETO_OPAQUE, &rAll, NULL, 0, NULL);
+ ExtTextOut(hDC, 0, 0, ETO_OPAQUE, &rAll, nullptr, 0, nullptr);
endDraw();
}
@@ -87,10 +87,10 @@ HDC Canvas::beginDraw()
m_pBMIH->biClrUsed = 0;
m_pBMIH->biClrImportant = 0;
- BYTE* pData = 0;
+ BYTE* pData = nullptr;
- m_hDC = CreateCompatibleDC(NULL);
- m_hBmp = CreateDIBSection(m_hDC, reinterpret_cast<BITMAPINFO*>(m_pBMIH), DIB_RGB_COLORS, reinterpret_cast<void**>(&pData), NULL, 0);
+ m_hDC = CreateCompatibleDC(nullptr);
+ m_hBmp = CreateDIBSection(m_hDC, reinterpret_cast<BITMAPINFO*>(m_pBMIH), DIB_RGB_COLORS, reinterpret_cast<void**>(&pData), nullptr, 0);
}
m_hOldBmp = SelectObject(m_hDC, m_hBmp);
@@ -101,7 +101,7 @@ HDC Canvas::beginDraw()
void Canvas::endDraw()
{
SelectObject(m_hDC, m_hOldBmp);
- m_hOldBmp = NULL;
+ m_hOldBmp = nullptr;
}
bool Canvas::getDigest(Digest& digest)
diff --git a/plugins/HistoryStats/src/colbase_words.cpp b/plugins/HistoryStats/src/colbase_words.cpp
index 9f80ba1f92..e45c77e019 100644
--- a/plugins/HistoryStats/src/colbase_words.cpp
+++ b/plugins/HistoryStats/src/colbase_words.cpp
@@ -164,7 +164,7 @@ void ColBaseWords::parseMsg(WordMap* pWords, const ext::string& msg, bool bOutgo
}
ColBaseWords::ColBaseWords() : m_nSource(2), m_nMinLength(1), m_nMaxLength(0), m_bFilterLinks(true),
- m_hSource(NULL), m_hMinLength(NULL), m_hMaxLength(NULL), m_hFilterLinks(NULL),
+ m_hSource(nullptr), m_hMinLength(nullptr), m_hMaxLength(nullptr), m_hFilterLinks(nullptr),
m_bFilterMessages(false), m_bFilterWords(false)
{
}
@@ -221,7 +221,7 @@ void ColBaseWords::impl_configToUI(OptionsCtrl& Opt, OptionsCtrl::Item hGroup)
OptionsCtrl::Group hTemp;
hTemp = Opt.insertGroup (hGroup, TranslateT("Extract words from"));
- m_hSource = Opt.insertRadio (hTemp, NULL, TranslateT("Incoming messages"));
+ m_hSource = Opt.insertRadio (hTemp, nullptr, TranslateT("Incoming messages"));
Opt.insertRadio (hTemp, m_hSource, TranslateT("Outgoing messages"));
Opt.insertRadio (hTemp, m_hSource, TranslateT("All messages"));
m_hMinLength = Opt.insertEdit(hGroup, TranslateT("Ignore words shorter than (chars)"), L"", OptionsCtrl::OCF_NUMBER);
@@ -308,7 +308,7 @@ void ColBaseWords::impl_contactDataFree(Contact& contact) const
WordMap* pData = reinterpret_cast<WordMap*>(contact.getSlot(contactDataSlotGet()));
if (pData) {
delete pData;
- contact.setSlot(contactDataSlotGet(), NULL);
+ contact.setSlot(contactDataSlotGet(), nullptr);
}
}
diff --git a/plugins/HistoryStats/src/column.cpp b/plugins/HistoryStats/src/column.cpp
index 1a0d85f2fb..51d9967873 100644
--- a/plugins/HistoryStats/src/column.cpp
+++ b/plugins/HistoryStats/src/column.cpp
@@ -85,7 +85,7 @@ Column* Column::fromUID(const ext::string& guid)
return getColInfo(i).m_pFactory->makeInstance();
}
- return NULL;
+ return nullptr;
}
void Column::registerUID(FactoryBase* pFactory)
@@ -147,7 +147,7 @@ Column* Column::clone() const
void Column::outputBegin()
{
- int restrictions = configGetRestrictions(NULL);
+ int restrictions = configGetRestrictions(nullptr);
m_bUsePNG =
m_pSettings->isPNGOutputActiveAndAvailable() && // do we want PNG output?
diff --git a/plugins/HistoryStats/src/column_chatduration.cpp b/plugins/HistoryStats/src/column_chatduration.cpp
index 96af1bc4aa..fba75dbfc4 100644
--- a/plugins/HistoryStats/src/column_chatduration.cpp
+++ b/plugins/HistoryStats/src/column_chatduration.cpp
@@ -5,7 +5,7 @@
* ColChatDuration
*/
ColChatDuration::ColChatDuration() : m_nVisMode(3), m_bGraph(true), m_bDetail(true),
- m_hVisMode(NULL), m_hGraph(NULL), m_hDetail(NULL), m_nMaxForGraph(0)
+ m_hVisMode(nullptr), m_hGraph(nullptr), m_hDetail(nullptr), m_nMaxForGraph(0)
{
}
@@ -37,7 +37,7 @@ void ColChatDuration::impl_configToUI(OptionsCtrl& Opt, OptionsCtrl::Item hGroup
OptionsCtrl::Item hTemp;
hTemp = Opt.insertGroup(hGroup, TranslateT("Chat duration type"));
- m_hVisMode = Opt.insertRadio(hTemp, NULL, TranslateT("Minimum"));
+ m_hVisMode = Opt.insertRadio(hTemp, nullptr, TranslateT("Minimum"));
Opt.insertRadio(hTemp, m_hVisMode, TranslateT("Average"));
Opt.insertRadio(hTemp, m_hVisMode, TranslateT("Maximum"));
Opt.insertRadio(hTemp, m_hVisMode, TranslateT("Total (sum of all chats)"));
@@ -217,7 +217,7 @@ void ColChatDuration::impl_outputRenderRow(ext::ostream& tos, const Contact& con
HDC hDC = canvas.beginDraw();
SetBkColor(hDC, con::ColorBar);
- ExtTextOut(hDC, 0, 0, ETO_OPAQUE, utils::rect(0, 0, barW, 15), NULL, 0, NULL);
+ ExtTextOut(hDC, 0, 0, ETO_OPAQUE, utils::rect(0, 0, barW, 15), nullptr, 0, nullptr);
canvas.endDraw();
diff --git a/plugins/HistoryStats/src/column_events.cpp b/plugins/HistoryStats/src/column_events.cpp
index bdee38136a..016558f0ca 100644
--- a/plugins/HistoryStats/src/column_events.cpp
+++ b/plugins/HistoryStats/src/column_events.cpp
@@ -6,7 +6,7 @@
*/
ColEvents::ColEvents()
- : m_nSource(5), m_hSource(NULL)
+ : m_nSource(5), m_hSource(nullptr)
{
}
diff --git a/plugins/HistoryStats/src/column_inout.cpp b/plugins/HistoryStats/src/column_inout.cpp
index d305783e91..4a7ab6aec8 100644
--- a/plugins/HistoryStats/src/column_inout.cpp
+++ b/plugins/HistoryStats/src/column_inout.cpp
@@ -7,7 +7,7 @@
ColInOut::ColInOut()
: m_nSource(2), m_bAbsolute(false), m_nAbsTime(1),
- m_hSource(NULL), m_hAbsolute(NULL), m_hAbsTime(NULL)
+ m_hSource(nullptr), m_hAbsolute(nullptr), m_hAbsTime(nullptr)
{
}
@@ -40,9 +40,9 @@ void ColInOut::impl_configToUI(OptionsCtrl& Opt, OptionsCtrl::Item hGroup)
m_hSource = Opt.insertCombo(hGroup, TranslateT("Data source"));
hTemp = Opt.insertGroup(hGroup, TranslateT("Display as"));
- m_hAbsolute = Opt.insertRadio(hTemp, NULL, TranslateT("Absolute"));
+ m_hAbsolute = Opt.insertRadio(hTemp, nullptr, TranslateT("Absolute"));
m_hAbsolute = Opt.insertRadio(hTemp, m_hAbsolute, TranslateT("Average"), OptionsCtrl::OCF_DISABLECHILDSONUNCHECK);
- m_hAbsTime = Opt.insertRadio(m_hAbsolute, NULL, TranslateT("Units per day"));
+ m_hAbsTime = Opt.insertRadio(m_hAbsolute, nullptr, TranslateT("Units per day"));
Opt.insertRadio(m_hAbsolute, m_hAbsTime, TranslateT("Units per week"));
Opt.insertRadio(m_hAbsolute, m_hAbsTime, TranslateT("Units per month (30 days)"));
diff --git a/plugins/HistoryStats/src/column_inoutgraph.cpp b/plugins/HistoryStats/src/column_inoutgraph.cpp
index e448e40b73..f5f10559fd 100644
--- a/plugins/HistoryStats/src/column_inoutgraph.cpp
+++ b/plugins/HistoryStats/src/column_inoutgraph.cpp
@@ -8,8 +8,8 @@
ColInOutGraph::ColInOutGraph()
: m_nSource(0), m_bAbsolute(false), m_nAbsTime(1), m_bShowSum(true),
m_bDetail(true), m_bDetailPercent(false), m_bDetailInvert(false), m_bGraphPercent(true),
- m_hSource(NULL), m_hAbsolute(NULL), m_hAbsTime(NULL), m_hShowSum(NULL),
- m_hDetail(NULL), m_hDetailPercent(NULL), m_hDetailInvert(NULL), m_hGraphPercent(NULL)
+ m_hSource(nullptr), m_hAbsolute(nullptr), m_hAbsTime(nullptr), m_hShowSum(nullptr),
+ m_hDetail(nullptr), m_hDetailPercent(nullptr), m_hDetailInvert(nullptr), m_hGraphPercent(nullptr)
{
}
@@ -56,13 +56,13 @@ void ColInOutGraph::impl_configToUI(OptionsCtrl& Opt, OptionsCtrl::Item hGroup)
OptionsCtrl::Group hTemp;
hTemp = Opt.insertGroup(hGroup, TranslateT("Data source"));
- m_hSource = Opt.insertRadio(hTemp, NULL, TranslateT("Characters"));
+ m_hSource = Opt.insertRadio(hTemp, nullptr, TranslateT("Characters"));
Opt.insertRadio(hTemp, m_hSource, TranslateT("Messages"));
Opt.insertRadio(hTemp, m_hSource, TranslateT("Chats"));
hTemp = Opt.insertGroup(hGroup, TranslateT("Display as"));
- m_hAbsolute = Opt.insertRadio(hTemp, NULL, TranslateT("Absolute"));
+ m_hAbsolute = Opt.insertRadio(hTemp, nullptr, TranslateT("Absolute"));
m_hAbsolute = Opt.insertRadio(hTemp, m_hAbsolute, TranslateT("Average"), OptionsCtrl::OCF_DISABLECHILDSONUNCHECK);
- m_hAbsTime = Opt.insertRadio(m_hAbsolute, NULL, TranslateT("Units per day"));
+ m_hAbsTime = Opt.insertRadio(m_hAbsolute, nullptr, TranslateT("Units per day"));
Opt.insertRadio(m_hAbsolute, m_hAbsTime, TranslateT("Units per week"));
Opt.insertRadio(m_hAbsolute, m_hAbsTime, TranslateT("Units per month (30 days)"));
m_hShowSum = Opt.insertCheck(hGroup, TranslateT("Show sum of incoming and outgoing"));
@@ -272,10 +272,10 @@ void ColInOutGraph::impl_outputRenderRow(ext::ostream& tos, const Contact& conta
HDC hDC = canvas.beginDraw();
SetBkColor(hDC, con::ColorOut);
- ExtTextOut(hDC, 0, 0, ETO_OPAQUE, utils::rect(0, 0, outW, 15), NULL, 0, NULL);
+ ExtTextOut(hDC, 0, 0, ETO_OPAQUE, utils::rect(0, 0, outW, 15), nullptr, 0, nullptr);
SetBkColor(hDC, con::ColorIn);
- ExtTextOut(hDC, 0, 0, ETO_OPAQUE, utils::rect(100 - inW, 0, 100, 15), NULL, 0, NULL);
+ ExtTextOut(hDC, 0, 0, ETO_OPAQUE, utils::rect(100 - inW, 0, 100, 15), nullptr, 0, nullptr);
if (m_bGraphPercent)
{
diff --git a/plugins/HistoryStats/src/column_nick.cpp b/plugins/HistoryStats/src/column_nick.cpp
index 4ab72104ec..948656d5d1 100644
--- a/plugins/HistoryStats/src/column_nick.cpp
+++ b/plugins/HistoryStats/src/column_nick.cpp
@@ -8,8 +8,8 @@
ColNick::ColNick()
: m_bDetail(true)
, m_bContactCount(true)
- , m_hDetail(NULL)
- , m_hContactCount(NULL)
+ , m_hDetail(nullptr)
+ , m_hContactCount(nullptr)
{
}
diff --git a/plugins/HistoryStats/src/column_split.cpp b/plugins/HistoryStats/src/column_split.cpp
index 512875a3c0..7b6c7b8b6b 100644
--- a/plugins/HistoryStats/src/column_split.cpp
+++ b/plugins/HistoryStats/src/column_split.cpp
@@ -9,9 +9,9 @@ ColSplit::ColSplit()
: m_nSource(0), m_nSourceType(2), m_nVisMode(0),
m_nBlockUnit(0), m_nUnitsPerBlock(6), m_nBlocks(28), m_nGraphAlign(1),
m_bDetail(true),
- m_hSource(NULL), m_hVisMode(NULL),
- m_hBlockUnit(NULL), m_hUnitsPerBlock(NULL), m_hBlocks(NULL), m_hGraphAlign(NULL),
- m_hDetail(NULL),
+ m_hSource(nullptr), m_hVisMode(nullptr),
+ m_hBlockUnit(nullptr), m_hUnitsPerBlock(nullptr), m_hBlocks(nullptr), m_hGraphAlign(nullptr),
+ m_hDetail(nullptr),
m_nTimeDiv(3600), m_nTimeMod(24), m_nTimeOffset(0)
{
}
@@ -61,7 +61,7 @@ void ColSplit::impl_configToUI(OptionsCtrl& Opt, OptionsCtrl::Item hGroup)
m_hSource = Opt.insertCombo(hGroup, TranslateT("Data source"));
hTemp = Opt.insertGroup(hGroup, TranslateT("\"Split\" type"));
- m_hVisMode = Opt.insertRadio(hTemp, NULL, TranslateT("Hours of day"));
+ m_hVisMode = Opt.insertRadio(hTemp, nullptr, TranslateT("Hours of day"));
Opt.insertRadio(hTemp, m_hVisMode, TranslateT("Days of week"));
hTempRadio = Opt.insertRadio(hTemp, m_hVisMode, TranslateT("Custom (for experts only)"), OptionsCtrl::OCF_DISABLECHILDSONUNCHECK);
hTemp = Opt.insertGroup(hTempRadio, TranslateT("Column setup"));
@@ -69,7 +69,7 @@ void ColSplit::impl_configToUI(OptionsCtrl& Opt, OptionsCtrl::Item hGroup)
m_hUnitsPerBlock = Opt.insertEdit (hTemp, TranslateT("Units per bar"), L"", OptionsCtrl::OCF_NUMBER);
m_hBlocks = Opt.insertEdit (hTemp, TranslateT("Bars per graph"), L"", OptionsCtrl::OCF_NUMBER);
hTemp = Opt.insertGroup(hTempRadio, TranslateT("Graph alignment"));
- m_hGraphAlign = Opt.insertRadio(hTemp, NULL, TranslateT("Align on day boundary"));
+ m_hGraphAlign = Opt.insertRadio(hTemp, nullptr, TranslateT("Align on day boundary"));
Opt.insertRadio(hTemp, m_hGraphAlign, TranslateT("Align on week boundary"));
m_hDetail = Opt.insertCheck(hGroup, TranslateT("Details for every bar (tooltip)"));
@@ -188,7 +188,7 @@ void ColSplit::impl_contactDataFree(Contact& contact) const
if (pData)
{
delete[] pData;
- contact.setSlot(contactDataSlotGet(), NULL);
+ contact.setSlot(contactDataSlotGet(), nullptr);
}
}
@@ -389,7 +389,7 @@ void ColSplit::impl_outputRenderRow(ext::ostream& tos, const Contact& contact, D
{
int bar_len = (50 * part_top + top - 1) / top;
- ExtTextOut(hDC, 0, 0, ETO_OPAQUE, utils::rect(j * 5, 50 - bar_len, j * 5 + 4, 50), NULL, 0, NULL);
+ ExtTextOut(hDC, 0, 0, ETO_OPAQUE, utils::rect(j * 5, 50 - bar_len, j * 5 + 4, 50), nullptr, 0, nullptr);
}
}
diff --git a/plugins/HistoryStats/src/column_splittimeline.cpp b/plugins/HistoryStats/src/column_splittimeline.cpp
index a5b75c0918..ad1a6b5915 100644
--- a/plugins/HistoryStats/src/column_splittimeline.cpp
+++ b/plugins/HistoryStats/src/column_splittimeline.cpp
@@ -9,9 +9,9 @@ ColSplitTimeline::ColSplitTimeline()
: m_nSource(0), m_nSourceType(2), m_nIgnoreOld(0), m_nVisMode(0),
m_nHODGroup(1), m_nDOWGroup(1), m_nBlockUnit(0), m_nUnitsPerBlock(6),
m_nBlocks(28), m_nGraphAlign(1), m_nCustomGroup(1), m_bTopPerColumn(true),
- m_hSource(NULL), m_hIgnoreOld(NULL), m_hVisMode(NULL),
- m_hHODGroup(NULL), m_hDOWGroup(NULL), m_hBlockUnit(NULL), m_hUnitsPerBlock(NULL),
- m_hBlocks(NULL), m_hGraphAlign(NULL), m_hCustomGroup(NULL),m_hTopPerColumn(NULL),
+ m_hSource(nullptr), m_hIgnoreOld(nullptr), m_hVisMode(nullptr),
+ m_hHODGroup(nullptr), m_hDOWGroup(nullptr), m_hBlockUnit(nullptr), m_hUnitsPerBlock(nullptr),
+ m_hBlocks(nullptr), m_hGraphAlign(nullptr), m_hCustomGroup(nullptr),m_hTopPerColumn(nullptr),
m_nTimeDiv(3600), m_nTimeOffset(0),
m_nTimelineWidth(0), m_nBlockOffset(0), m_nNumBlocks(0)
{
@@ -75,7 +75,7 @@ void ColSplitTimeline::impl_configToUI(OptionsCtrl& Opt, OptionsCtrl::Item hGrou
m_hSource = Opt.insertCombo(hGroup, TranslateT("Data source"));
m_hIgnoreOld = Opt.insertEdit(hGroup, TranslateT("Drop everything older than (days, 0=no limit)"), L"", OptionsCtrl::OCF_NUMBER);
hTemp = Opt.insertGroup(hGroup, TranslateT("\"Split\" type"));
- m_hVisMode = Opt.insertRadio(hTemp, NULL, TranslateT("Hours of day"), OptionsCtrl::OCF_DISABLECHILDSONUNCHECK);
+ m_hVisMode = Opt.insertRadio(hTemp, nullptr, TranslateT("Hours of day"), OptionsCtrl::OCF_DISABLECHILDSONUNCHECK);
m_hHODGroup = Opt.insertEdit (m_hVisMode, TranslateT("Number of days to group"), L"", OptionsCtrl::OCF_NUMBER);
hTempRadio = Opt.insertRadio(hTemp, m_hVisMode, TranslateT("Days of week"), OptionsCtrl::OCF_DISABLECHILDSONUNCHECK);
m_hDOWGroup = Opt.insertEdit (hTempRadio, TranslateT("Number of weeks to group"), L"", OptionsCtrl::OCF_NUMBER);
@@ -85,7 +85,7 @@ void ColSplitTimeline::impl_configToUI(OptionsCtrl& Opt, OptionsCtrl::Item hGrou
m_hUnitsPerBlock = Opt.insertEdit (hTemp, TranslateT("Units per block"), L"", OptionsCtrl::OCF_NUMBER);
m_hBlocks = Opt.insertEdit (hTemp, TranslateT("Blocks per column"), L"", OptionsCtrl::OCF_NUMBER);
hTemp = Opt.insertGroup(hTempRadio, TranslateT("Graph alignment"));
- m_hGraphAlign = Opt.insertRadio(hTemp, NULL, TranslateT("Align on day boundary"));
+ m_hGraphAlign = Opt.insertRadio(hTemp, nullptr, TranslateT("Align on day boundary"));
Opt.insertRadio(hTemp, m_hGraphAlign, TranslateT("Align on week boundary"));
m_hCustomGroup = Opt.insertEdit (hTempRadio, TranslateT("Number of columns to group"), L"", OptionsCtrl::OCF_NUMBER);
m_hTopPerColumn = Opt.insertCheck(hGroup, TranslateT("Calculate maximum per column (not per graph)"));
@@ -201,7 +201,7 @@ void ColSplitTimeline::impl_contactDataFree(Contact& contact) const
if (pData)
{
delete pData;
- contact.setSlot(contactDataSlotGet(), NULL);
+ contact.setSlot(contactDataSlotGet(), nullptr);
}
}
@@ -536,7 +536,7 @@ void ColSplitTimeline::outputRenderRowInOut(ext::ostream& tos, const Contact& co
int color = 255 * part_top / top;
SetBkColor(hDC, colorTab[color]);
- ExtTextOut(hDC, 0, 0, ETO_OPAQUE, &r, NULL, 0, NULL);
+ ExtTextOut(hDC, 0, 0, ETO_OPAQUE, &r, nullptr, 0, nullptr);
}
}
}
@@ -619,7 +619,7 @@ void ColSplitTimeline::outputRenderRowRatio(ext::ostream& tos, const Contact& co
}
SetBkColor(hDC, color);
- ExtTextOut(hDC, 0, 0, ETO_OPAQUE, &r, NULL, 0, NULL);
+ ExtTextOut(hDC, 0, 0, ETO_OPAQUE, &r, nullptr, 0, nullptr);
}
}
}
diff --git a/plugins/HistoryStats/src/column_timeline.cpp b/plugins/HistoryStats/src/column_timeline.cpp
index 9c82240562..1c4b5ce657 100644
--- a/plugins/HistoryStats/src/column_timeline.cpp
+++ b/plugins/HistoryStats/src/column_timeline.cpp
@@ -6,7 +6,7 @@
*/
ColTimeline::ColTimeline() : m_nSource(0), m_nSourceType(2), m_nIgnoreOld(0), m_bDetail(true),
- m_nDays(7), m_hSource(NULL), m_hIgnoreOld(NULL), m_hDetail(NULL), m_hDays(NULL),
+ m_nDays(7), m_hSource(nullptr), m_hIgnoreOld(nullptr), m_hDetail(nullptr), m_hDays(nullptr),
m_nTimelineWidth(0), m_nFirstDay(0), m_nLastDay(0)
{
}
@@ -113,7 +113,7 @@ void ColTimeline::impl_contactDataFree(Contact& contact) const
if (pData)
{
delete pData;
- contact.setSlot(contactDataSlotGet(), NULL);
+ contact.setSlot(contactDataSlotGet(), nullptr);
}
}
@@ -298,11 +298,11 @@ void ColTimeline::outputRenderRowInOut(ext::ostream& tos, const Contact& contact
int from_left = 3 * ((curDay - m_nFirstDay) / m_nDays);
if (bar_len != 0)
- ExtTextOut(hDC, 0, 0, ETO_OPAQUE, utils::rect(from_left, 24 - bar_len, from_left + 3, 25 + bar_len), NULL, 0, NULL);
+ ExtTextOut(hDC, 0, 0, ETO_OPAQUE, utils::rect(from_left, 24 - bar_len, from_left + 3, 25 + bar_len), nullptr, 0, nullptr);
}
SetBkColor(hDC, con::ColorBarLine);
- ExtTextOut(hDC, 0, 0, ETO_OPAQUE, utils::rect(0, 24, m_nTimelineWidth, 25), NULL, 0, NULL);
+ ExtTextOut(hDC, 0, 0, ETO_OPAQUE, utils::rect(0, 24, m_nTimelineWidth, 25), nullptr, 0, nullptr);
canvas.endDraw();
@@ -399,7 +399,7 @@ void ColTimeline::outputRenderRowRatio(ext::ostream& tos, const Contact& contact
HDC hDC = canvas.beginDraw();
SetBkColor(hDC, con::ColorIOLine);
- ExtTextOut(hDC, 0, 0, ETO_OPAQUE, utils::rect(0, 24, m_nTimelineWidth, 25), NULL, 0, NULL);
+ ExtTextOut(hDC, 0, 0, ETO_OPAQUE, utils::rect(0, 24, m_nTimelineWidth, 25), nullptr, 0, nullptr);
for (curDay = m_nFirstDay; curDay <= m_nLastDay; curDay += m_nDays)
{
@@ -430,12 +430,12 @@ void ColTimeline::outputRenderRowRatio(ext::ostream& tos, const Contact& contact
if (bar_len < 0)
{
SetBkColor(hDC, con::ColorIn);
- ExtTextOut(hDC, 0, 0, ETO_OPAQUE, utils::rect(from_left, 24, from_left + 3, 24 - bar_len), NULL, 0, NULL);
+ ExtTextOut(hDC, 0, 0, ETO_OPAQUE, utils::rect(from_left, 24, from_left + 3, 24 - bar_len), nullptr, 0, nullptr);
}
else if (bar_len > 0)
{
SetBkColor(hDC, con::ColorOut);
- ExtTextOut(hDC, 0, 0, ETO_OPAQUE, utils::rect(from_left, 25 - bar_len, from_left + 3, 25), NULL, 0, NULL);
+ ExtTextOut(hDC, 0, 0, ETO_OPAQUE, utils::rect(from_left, 25 - bar_len, from_left + 3, 25), nullptr, 0, nullptr);
}
}
diff --git a/plugins/HistoryStats/src/column_wordcount.cpp b/plugins/HistoryStats/src/column_wordcount.cpp
index 65d59fe21d..e764e378de 100644
--- a/plugins/HistoryStats/src/column_wordcount.cpp
+++ b/plugins/HistoryStats/src/column_wordcount.cpp
@@ -9,7 +9,7 @@
ColWordCount::ColWordCount()
: m_nVisMode(0), m_bDetail(true),
- m_hVisMode(NULL), m_hDetail(NULL)
+ m_hVisMode(nullptr), m_hDetail(nullptr)
{
}
@@ -46,7 +46,7 @@ void ColWordCount::impl_configToUI(OptionsCtrl& Opt, OptionsCtrl::Item hGroup)
OptionsCtrl::Group hTemp;
hTemp = Opt.insertGroup(hGroup, TranslateT("Word count type"));
- m_hVisMode = Opt.insertRadio(hTemp, NULL, TranslateT("Total words"));
+ m_hVisMode = Opt.insertRadio(hTemp, nullptr, TranslateT("Total words"));
Opt.insertRadio(hTemp, m_hVisMode, TranslateT("Distinct words"));
Opt.insertRadio(hTemp, m_hVisMode, TranslateT("Ratio total/distinct words"));
m_hDetail = Opt.insertCheck(hGroup, TranslateT("Additional info in tooltip (depends on type)"));
@@ -72,7 +72,7 @@ void ColWordCount::impl_contactDataFree(Contact& contact) const
if (pTrData)
{
delete pTrData;
- contact.setSlot(contactDataTransformSlotGet(), NULL);
+ contact.setSlot(contactDataTransformSlotGet(), nullptr);
}
}
@@ -104,7 +104,7 @@ void ColWordCount::impl_contactDataTransformCleanup(Contact& contact) const
pData->clear();
delete[] pData;
- contact.setSlot(contactDataSlotGet(), NULL);
+ contact.setSlot(contactDataSlotGet(), nullptr);
}
}
diff --git a/plugins/HistoryStats/src/column_words.cpp b/plugins/HistoryStats/src/column_words.cpp
index b19b363913..47028ffccf 100644
--- a/plugins/HistoryStats/src/column_words.cpp
+++ b/plugins/HistoryStats/src/column_words.cpp
@@ -79,12 +79,12 @@ ColWords::ColWords()
, m_bDetail(true)
, m_bDetailInOut(false)
, m_bInOutColor(false)
- , m_hVisMode(NULL)
- , m_hNum(NULL)
- , m_hOffset(NULL)
- , m_hDetail(NULL)
- , m_hDetailInOut(NULL)
- , m_hInOutColor(NULL)
+ , m_hVisMode(nullptr)
+ , m_hNum(nullptr)
+ , m_hOffset(nullptr)
+ , m_hDetail(nullptr)
+ , m_hDetailInOut(nullptr)
+ , m_hInOutColor(nullptr)
{
}
@@ -133,7 +133,7 @@ void ColWords::impl_configToUI(OptionsCtrl& Opt, OptionsCtrl::Item hGroup)
OptionsCtrl::Group hTemp;
hTemp = Opt.insertGroup(hGroup, TranslateT("Words type"));
- m_hVisMode = Opt.insertRadio(hTemp, NULL, TranslateT("Most common words"));
+ m_hVisMode = Opt.insertRadio(hTemp, nullptr, TranslateT("Most common words"));
Opt.insertRadio(hTemp, m_hVisMode, TranslateT("Least common words"));
Opt.insertRadio(hTemp, m_hVisMode, TranslateT("Longest words"));
m_hNum = Opt.insertEdit (hGroup, TranslateT("Number of words"), L"", OptionsCtrl::OCF_NUMBER);
@@ -174,7 +174,7 @@ void ColWords::impl_contactDataFree(Contact& contact) const
if (pTrData)
{
delete pTrData;
- contact.setSlot(contactDataTransformSlotGet(), NULL);
+ contact.setSlot(contactDataTransformSlotGet(), nullptr);
}
}
@@ -197,7 +197,7 @@ void ColWords::impl_contactDataTransformCleanup(Contact& contact) const
pData->clear();
delete pData;
- contact.setSlot(contactDataSlotGet(), NULL);
+ contact.setSlot(contactDataSlotGet(), nullptr);
}
}
diff --git a/plugins/HistoryStats/src/contact.cpp b/plugins/HistoryStats/src/contact.cpp
index ed7e35c91d..8a03c1b746 100644
--- a/plugins/HistoryStats/src/contact.cpp
+++ b/plugins/HistoryStats/src/contact.cpp
@@ -86,7 +86,7 @@ void Contact::addChat(bool bOutgoing, DWORD, DWORD duration)
void Contact::addEvent(WORD eventType, bool bOutgoing)
{
- InOut* pIO = NULL;
+ InOut* pIO = nullptr;
switch (eventType) {
case EVENTTYPE_URL:
diff --git a/plugins/HistoryStats/src/dlgconfigure.cpp b/plugins/HistoryStats/src/dlgconfigure.cpp
index 63e21d6c3c..6aaa746b35 100644
--- a/plugins/HistoryStats/src/dlgconfigure.cpp
+++ b/plugins/HistoryStats/src/dlgconfigure.cpp
@@ -10,7 +10,7 @@
* DlgConfigure
*/
-HWND DlgConfigure::m_hCfgWnd = NULL;
+HWND DlgConfigure::m_hCfgWnd = nullptr;
bool DlgConfigure::m_bHookedEvent = false;
INT_PTR CALLBACK DlgConfigure::staticConfigureProc(HWND hDlg, UINT msg, WPARAM wParam, LPARAM lParam)
@@ -88,7 +88,7 @@ int DlgConfigure::staticEventPreShutdown(WPARAM, LPARAM)
void DlgConfigure::showModal()
{
if (g_bConfigureLock) {
- MessageBox(0,
+ MessageBox(nullptr,
TranslateT("You can't access the stand-alone configuration dialog of HistoryStats as long as the options dialog of Miranda NG is open. Please close the options dialog and try again.\r\n\r\nNote that the options offered by both dialogs are the same."),
TranslateT("HistoryStats - Warning"),
MB_ICONWARNING | MB_OK);
@@ -99,7 +99,7 @@ void DlgConfigure::showModal()
if (IsWindow(m_hCfgWnd))
SetForegroundWindow(m_hCfgWnd);
else
- CreateDialog(g_hInst, MAKEINTRESOURCE(IDD_CONFIGURE), NULL, staticConfigureProc);
+ CreateDialog(g_hInst, MAKEINTRESOURCE(IDD_CONFIGURE), nullptr, staticConfigureProc);
}
void DlgConfigure::onWMInitDialog()
@@ -184,11 +184,11 @@ void DlgConfigure::rearrangeControls()
utils::moveWindow(m_hOptWnd, rPage);
- InvalidateRect(m_hWnd, NULL, TRUE);
+ InvalidateRect(m_hWnd, nullptr, TRUE);
}
DlgConfigure::DlgConfigure(HWND hWnd) :
- m_hWnd(hWnd), m_bChanged(false), m_hOptWnd(NULL),
+ m_hWnd(hWnd), m_bChanged(false), m_hOptWnd(nullptr),
m_nPadY(-1), m_nOKPadX(0), m_nCancelPadX(0), m_nApplyPadX(0)
{
if (!m_hCfgWnd) {
@@ -206,5 +206,5 @@ DlgConfigure::~DlgConfigure()
DestroyWindow(m_hOptWnd);
if (m_hWnd == m_hCfgWnd)
- m_hCfgWnd = NULL;
+ m_hCfgWnd = nullptr;
}
diff --git a/plugins/HistoryStats/src/dlgfilterwords.cpp b/plugins/HistoryStats/src/dlgfilterwords.cpp
index 92b3143b84..aea8892a06 100644
--- a/plugins/HistoryStats/src/dlgfilterwords.cpp
+++ b/plugins/HistoryStats/src/dlgfilterwords.cpp
@@ -20,7 +20,7 @@ INT_PTR CALLBACK DlgFilterWords::staticDlgProc(HWND hDlg, UINT msg, WPARAM wPara
case WM_DESTROY:
pDlg->onWMDestroy();
- pDlg->m_hWnd = NULL;
+ pDlg->m_hWnd = nullptr;
SetWindowLongPtr(hDlg, DWLP_USER, 0);
return TRUE;
@@ -102,7 +102,7 @@ void DlgFilterWords::onWMInitDialog()
{
const Filter* pFilter = *i;
- HANDLE hCheck = m_Sets.insertCheck(NULL, pFilter->getName().c_str(), 0, reinterpret_cast<INT_PTR>(pFilter));
+ HANDLE hCheck = m_Sets.insertCheck(nullptr, pFilter->getName().c_str(), 0, reinterpret_cast<INT_PTR>(pFilter));
if (m_bColProvided && m_ColFilters.find(pFilter->getID()) != m_ColFilters.end())
m_Sets.checkItem(hCheck, true);
@@ -127,7 +127,7 @@ void DlgFilterWords::onWMInitDialog()
SendDlgItemMessage(m_hWnd, IDC_MODE, CB_SETCURSEL, 0, 0);
- onSetSelChanged(NULL, 0);
+ onSetSelChanged(nullptr, 0);
}
void DlgFilterWords::onWMDestroy()
@@ -155,7 +155,7 @@ void DlgFilterWords::onSetAdd()
m_Filters.push_back(pFilter);
- HANDLE hAdded = m_Sets.insertCheck(NULL, pFilter->getName().c_str(), 0, reinterpret_cast<UINT_PTR>(pFilter));
+ HANDLE hAdded = m_Sets.insertCheck(nullptr, pFilter->getName().c_str(), 0, reinterpret_cast<UINT_PTR>(pFilter));
m_Sets.selectItem(hAdded);
}
@@ -297,7 +297,7 @@ void DlgFilterWords::clearFilters()
m_Filters.clear();
}
-DlgFilterWords::DlgFilterWords() : m_hWnd(NULL), m_bColProvided(false)
+DlgFilterWords::DlgFilterWords() : m_hWnd(nullptr), m_bColProvided(false)
{
}
diff --git a/plugins/HistoryStats/src/dlgoption.cpp b/plugins/HistoryStats/src/dlgoption.cpp
index 61a67c04f2..07c9e3ac47 100644
--- a/plugins/HistoryStats/src/dlgoption.cpp
+++ b/plugins/HistoryStats/src/dlgoption.cpp
@@ -205,7 +205,7 @@ void DlgOption::onBandDropDown(HANDLE hButton, INT_PTR dwData)
if (dwData == opCreateWarn) {
AppendMenu(hPopup, MF_STRING, 1, TranslateT("Show warnings..."));
- AppendMenu(hPopup, MF_SEPARATOR, 0, NULL);
+ AppendMenu(hPopup, MF_SEPARATOR, 0, nullptr);
}
UINT iMenuFlags = g_pSettings->canShowStatistics() ? 0 : (MF_DISABLED | MF_GRAYED);
@@ -219,7 +219,7 @@ void DlgOption::onBandDropDown(HANDLE hButton, INT_PTR dwData)
ptMenu.y,
0,
getHWnd(),
- NULL);
+ nullptr);
DestroyMenu(hPopup);
@@ -321,7 +321,7 @@ int DlgOption::saveSettings()
void DlgOption::updateProblemInfo()
{
- bool bShowProblemInfo = reinterpret_cast<SubColumns*>(m_pPage[opColumns])->configHasConflicts(NULL);
+ bool bShowProblemInfo = reinterpret_cast<SubColumns*>(m_pPage[opColumns])->configHasConflicts(nullptr);
m_Band.showButton(m_hCreateButton, !bShowProblemInfo);
m_Band.showButton(m_hCreateWarnButton, bShowProblemInfo);
@@ -329,7 +329,7 @@ void DlgOption::updateProblemInfo()
DlgOption::DlgOption(HWND hWnd) :
m_hWnd(hWnd), m_bSettingsModified(false), m_nCurPage(-1), m_LocalS(*g_pSettings),
- m_hCreateButton(NULL), m_hCreateWarnButton(NULL), m_bAcquiredLock(false)
+ m_hCreateButton(nullptr), m_hCreateWarnButton(nullptr), m_bAcquiredLock(false)
{}
DlgOption::~DlgOption()
@@ -350,7 +350,7 @@ DlgOption::~DlgOption()
m_pPage[i]->destroyWindow();
// MEMO: don't delete them, they will delete themselves in their WM_DESTROY messages
- m_pPage[i] = NULL;
+ m_pPage[i] = nullptr;
}
}
} \ No newline at end of file
diff --git a/plugins/HistoryStats/src/dlgoption_subbase.cpp b/plugins/HistoryStats/src/dlgoption_subbase.cpp
index 8c971434d4..fca95cf406 100644
--- a/plugins/HistoryStats/src/dlgoption_subbase.cpp
+++ b/plugins/HistoryStats/src/dlgoption_subbase.cpp
@@ -31,7 +31,7 @@ INT_PTR CALLBACK DlgOption::SubBase::staticDlgProc(HWND hDlg, UINT msg, WPARAM w
}
DlgOption::SubBase::SubBase() :
- m_pParent(NULL), m_hWnd(NULL)
+ m_pParent(nullptr), m_hWnd(nullptr)
{
}
diff --git a/plugins/HistoryStats/src/dlgoption_subcolumns.cpp b/plugins/HistoryStats/src/dlgoption_subcolumns.cpp
index a2ff5e6ca8..54484d1877 100644
--- a/plugins/HistoryStats/src/dlgoption_subcolumns.cpp
+++ b/plugins/HistoryStats/src/dlgoption_subcolumns.cpp
@@ -67,7 +67,7 @@ INT_PTR CALLBACK DlgOption::SubColumns::staticAddProc(HWND hDlg, UINT msg, WPARA
}
DlgOption::SubColumns::SubColumns() :
- m_hColTitle(NULL),
+ m_hColTitle(nullptr),
m_bShowInfo(true),
m_nInfoHeight(0)
{
@@ -213,11 +213,11 @@ void DlgOption::SubColumns::loadSettings()
{
// remeber currently selected item
HANDLE hSelItem = m_Columns.getSelection();
- Column* pPrevCol = NULL;
+ Column* pPrevCol = nullptr;
if (hSelItem) {
pPrevCol = reinterpret_cast<Column*>(m_Columns.getItemData(hSelItem));
- hSelItem = NULL;
+ hSelItem = nullptr;
}
// remember scroll bar position
@@ -233,7 +233,7 @@ void DlgOption::SubColumns::loadSettings()
{
Column* pCol = localS.getCol(j);
ext::string colTitle = pCol->getTitleForOptions();
- OptionsCtrl::Check hColCheck = m_Columns.insertCheck(NULL, colTitle.c_str(), 0, reinterpret_cast<INT_PTR>(pCol));
+ OptionsCtrl::Check hColCheck = m_Columns.insertCheck(nullptr, colTitle.c_str(), 0, reinterpret_cast<INT_PTR>(pCol));
m_Columns.checkItem(hColCheck, pCol->isEnabled());
@@ -241,7 +241,7 @@ void DlgOption::SubColumns::loadSettings()
hSelItem = hColCheck;
}
- m_Columns.ensureVisible(NULL);
+ m_Columns.ensureVisible(nullptr);
m_Columns.setRedraw(true);
// restore scroll bar position
@@ -257,7 +257,7 @@ void DlgOption::SubColumns::saveSettings()
if (hSelItem) {
// deselect and select current item to save its options to localS
- m_Columns.selectItem(NULL);
+ m_Columns.selectItem(nullptr);
m_Columns.selectItem(hSelItem);
}
@@ -327,7 +327,7 @@ void DlgOption::SubColumns::addCol(int nCol)
getParent()->getLocalSettings().addCol(pCol);
- OptionsCtrl::Check hColCheck = m_Columns.insertCheck(NULL, TranslateW(pCol->getTitle()), 0, reinterpret_cast<INT_PTR>(pCol));
+ OptionsCtrl::Check hColCheck = m_Columns.insertCheck(nullptr, TranslateW(pCol->getTitle()), 0, reinterpret_cast<INT_PTR>(pCol));
m_Columns.checkItem(hColCheck, pCol->isEnabled());
@@ -349,7 +349,7 @@ void DlgOption::SubColumns::onColSelChanging(HANDLE hItem, INT_PTR)
m_Columns.setItemLabel(hItem, colTitle.c_str());
- m_hColTitle = NULL;
+ m_hColTitle = nullptr;
}
// column specific settings
@@ -378,25 +378,25 @@ void DlgOption::SubColumns::onColSelChanged(HANDLE hItem, INT_PTR)
Column* pCol = reinterpret_cast<Column*>(m_Columns.getItemData(hItem));
// general column settings
- OptionsCtrl::Group hGeneral = m_Options.insertGroup(NULL, TranslateT("General column settings"), OptionsCtrl::OCF_ROOTGROUP);
+ OptionsCtrl::Group hGeneral = m_Options.insertGroup(nullptr, TranslateT("General column settings"), OptionsCtrl::OCF_ROOTGROUP);
m_hColTitle = m_Options.insertEdit(hGeneral, TranslateT("Title (default if empty)"), pCol->getCustomTitle().c_str());
// column specific settings
if (pCol->getFeatures() & Column::cfHasConfig) {
- OptionsCtrl::Group hSpecific = m_Options.insertGroup(NULL, TranslateT("Column specific settings"), OptionsCtrl::OCF_ROOTGROUP);
+ OptionsCtrl::Group hSpecific = m_Options.insertGroup(nullptr, TranslateT("Column specific settings"), OptionsCtrl::OCF_ROOTGROUP);
pCol->configToUI(m_Options, hSpecific);
}
- m_Options.ensureVisible(NULL);
+ m_Options.ensureVisible(nullptr);
// show output info for current column
HWND hInfo = GetDlgItem(getHWnd(), IDC_INFO);
TVINSERTSTRUCT tvi;
bool bPNGOutput = getParent()->isPNGOutput();
int nPNGMode = getParent()->getPNGMode();
- int restrictions = pCol->configGetRestrictions(NULL);
+ int restrictions = pCol->configGetRestrictions(nullptr);
SendMessage(hInfo, WM_SETREDRAW, FALSE, 0);
TreeView_DeleteAllItems(hInfo);
@@ -494,9 +494,9 @@ void DlgOption::SubColumns::onColItemDropped(HANDLE hItem, HANDLE hDropTarget, B
// perform move
Column* pItem = reinterpret_cast<Column*>(m_Columns.getItemData(hItem));
- Column* pDropTaregt = hDropTarget ? reinterpret_cast<Column*>(m_Columns.getItemData(hDropTarget)) : NULL;
+ Column* pDropTaregt = hDropTarget ? reinterpret_cast<Column*>(m_Columns.getItemData(hDropTarget)) : nullptr;
- m_Columns.selectItem(NULL);
+ m_Columns.selectItem(nullptr);
getParent()->getLocalSettings().moveCol(pItem, pDropTaregt);
m_Columns.moveItem(hItem, hDropTarget);
@@ -551,7 +551,7 @@ void DlgOption::SubColumns::onBandDropDown(HANDLE hButton, INT_PTR dwData)
ptMenu.y,
0,
getHWnd(),
- NULL);
+ nullptr);
DestroyMenu(hPopup);
@@ -595,9 +595,9 @@ void DlgOption::SubColumns::onMoveUp()
hPrev2 = m_Columns.getPrevItem(hPrev2);
Column* pSelCol = reinterpret_cast<Column*>(m_Columns.getItemData(hSel));
- Column* pPrev2Col = hPrev2 ? reinterpret_cast<Column*>(m_Columns.getItemData(hPrev2)) : NULL;
+ Column* pPrev2Col = hPrev2 ? reinterpret_cast<Column*>(m_Columns.getItemData(hPrev2)) : nullptr;
- m_Columns.selectItem(NULL);
+ m_Columns.selectItem(nullptr);
getParent()->getLocalSettings().moveCol(pSelCol, pPrev2Col);
m_Columns.moveItem(hSel, hPrev2);
@@ -620,7 +620,7 @@ void DlgOption::SubColumns::onMoveDown()
Column* pSelCol = reinterpret_cast<Column*>(m_Columns.getItemData(hSel));
Column* pNextCol = reinterpret_cast<Column*>(m_Columns.getItemData(hNext));
- m_Columns.selectItem(NULL);
+ m_Columns.selectItem(nullptr);
getParent()->getLocalSettings().moveCol(pSelCol, pNextCol);
m_Columns.moveItem(hSel, hNext);
@@ -658,12 +658,12 @@ bool DlgOption::SubColumns::configHasConflicts(HelpVec* pHelp)
Column* pCol = reinterpret_cast<Column*>(m_Columns.getItemData(hItem));
if (pCol) {
- int restrictions = pCol->configGetRestrictions(pHelp ? &curDetails : NULL);
+ int restrictions = pCol->configGetRestrictions(pHelp ? &curDetails : nullptr);
// sanity check: either HTML or PNG has to be fully supported
if ((restrictions & Column::crHTMLMask) != Column::crHTMLFull &&
(restrictions & Column::crPNGMask) != Column::crPNGFull) {
- MessageBox(NULL,
+ MessageBox(nullptr,
TranslateT("An internal column configuration error occurred. Please contact the author of this plugin."),
TranslateT("HistoryStats - Error"), MB_ICONERROR | MB_OK);
}
diff --git a/plugins/HistoryStats/src/dlgoption_subexclude.cpp b/plugins/HistoryStats/src/dlgoption_subexclude.cpp
index d0748d71f8..c0bf6e97f9 100644
--- a/plugins/HistoryStats/src/dlgoption_subexclude.cpp
+++ b/plugins/HistoryStats/src/dlgoption_subexclude.cpp
@@ -9,7 +9,7 @@
*/
DlgOption::SubExclude::SubExclude() :
- m_hItemAll(NULL), m_bChanged(false)
+ m_hItemAll(nullptr), m_bChanged(false)
{
}
@@ -281,6 +281,6 @@ void DlgOption::SubExclude::setAll(HWND hCList, HANDLE hFirstItem, int iImage, b
if (iOldIcon != 0xFF && iOldIcon != iImage)
SendMessage(hCList, CLM_SETEXTRAIMAGE, reinterpret_cast<WPARAM>(hItem), MAKELPARAM(0, iImage));
- hItem = bIterate ? reinterpret_cast<HANDLE>(SendMessage(hCList, CLM_GETNEXTITEM, CLGN_NEXTCONTACT, reinterpret_cast<LPARAM>(hItem))) : NULL;
+ hItem = bIterate ? reinterpret_cast<HANDLE>(SendMessage(hCList, CLM_GETNEXTITEM, CLGN_NEXTCONTACT, reinterpret_cast<LPARAM>(hItem))) : nullptr;
}
}
diff --git a/plugins/HistoryStats/src/dlgoption_subglobal.cpp b/plugins/HistoryStats/src/dlgoption_subglobal.cpp
index 4727738845..2ceed39e26 100644
--- a/plugins/HistoryStats/src/dlgoption_subglobal.cpp
+++ b/plugins/HistoryStats/src/dlgoption_subglobal.cpp
@@ -74,7 +74,7 @@ INT_PTR CALLBACK DlgOption::SubGlobal::staticInfoProc(HWND hDlg, UINT msg, WPARA
RECT rDetails;
GetWindowRect(GetDlgItem(hDlg, IDC_DESCRIPTION), &rDetails);
- SetWindowPos(GetDlgItem(hDlg, IDC_DESCRIPTION), NULL, 0, 0, rDetails.right - rDetails.left, rDetails.bottom - rDetails.top + nHeightAdd, SWP_NOMOVE | SWP_NOZORDER);
+ SetWindowPos(GetDlgItem(hDlg, IDC_DESCRIPTION), nullptr, 0, 0, rDetails.right - rDetails.left, rDetails.bottom - rDetails.top + nHeightAdd, SWP_NOMOVE | SWP_NOZORDER);
}
}
return TRUE;
@@ -129,16 +129,16 @@ INT_PTR CALLBACK DlgOption::SubGlobal::staticInfoProc(HWND hDlg, UINT msg, WPARA
}
DlgOption::SubGlobal::SubGlobal() :
- m_hOnStartup(NULL),
- m_hShowMainMenu(NULL),
- m_hShowMainMenuSub(NULL),
- m_hShowContactMenu(NULL),
- m_hShowContactMenuPseudo(NULL),
- m_hGraphicsMode(NULL),
- m_hGraphicsModePNG(NULL),
- m_hPNGMode(NULL),
- m_hThreadLowPriority(NULL),
- m_hPathToBrowser(NULL),
+ m_hOnStartup(nullptr),
+ m_hShowMainMenu(nullptr),
+ m_hShowMainMenuSub(nullptr),
+ m_hShowContactMenu(nullptr),
+ m_hShowContactMenuPseudo(nullptr),
+ m_hGraphicsMode(nullptr),
+ m_hGraphicsModePNG(nullptr),
+ m_hPNGMode(nullptr),
+ m_hThreadLowPriority(nullptr),
+ m_hPathToBrowser(nullptr),
m_bShowInfo(false),
m_nInfoHeight(0)
{
@@ -219,20 +219,20 @@ void DlgOption::SubGlobal::onWMInitDialog()
// settings
OptionsCtrl::Item hTemp;
- hTemp = m_Options.insertGroup(NULL, TranslateT("Integration"), OptionsCtrl::OCF_ROOTGROUP);
+ hTemp = m_Options.insertGroup(nullptr, TranslateT("Integration"), OptionsCtrl::OCF_ROOTGROUP);
m_hOnStartup = m_Options.insertCheck(hTemp, TranslateT("Create statistics on Miranda NG startup"));
m_hShowMainMenu = m_Options.insertCheck(hTemp, TranslateT("Add menu items to main menu"), OptionsCtrl::OCF_DISABLECHILDSONUNCHECK);
m_hShowMainMenuSub = m_Options.insertCheck(m_hShowMainMenu, TranslateT("Put menu items into submenu"));
m_hShowContactMenu = m_Options.insertCheck(hTemp, TranslateT("Add menu items to contact menu"), OptionsCtrl::OCF_DISABLECHILDSONUNCHECK);
m_hShowContactMenuPseudo = m_Options.insertCheck(m_hShowContactMenu, TranslateT("Don't hide menu items for pseudo protocols"));
m_hProtocols = m_Options.insertGroup(m_hShowContactMenu, TranslateT("Hide menu items for protocol..."));
- hTemp = m_Options.insertGroup(NULL, TranslateT("Graphics"), OptionsCtrl::OCF_ROOTGROUP | OptionsCtrl::OCF_NODISABLECHILDS);
- m_hGraphicsMode = m_Options.insertRadio(hTemp, NULL, TranslateT("Only use HTML to simulate graphics"));
+ hTemp = m_Options.insertGroup(nullptr, TranslateT("Graphics"), OptionsCtrl::OCF_ROOTGROUP | OptionsCtrl::OCF_NODISABLECHILDS);
+ m_hGraphicsMode = m_Options.insertRadio(hTemp, nullptr, TranslateT("Only use HTML to simulate graphics"));
m_hGraphicsModePNG = m_Options.insertRadio(hTemp, m_hGraphicsMode, TranslateT("Generate PNG files to represent graphics"), OptionsCtrl::OCF_DISABLECHILDSONUNCHECK);
- m_hPNGMode = m_Options.insertRadio(m_hGraphicsModePNG, NULL, TranslateT("Fall back to HTML output if column options require HTML output"));
+ m_hPNGMode = m_Options.insertRadio(m_hGraphicsModePNG, nullptr, TranslateT("Fall back to HTML output if column options require HTML output"));
m_Options.insertRadio(m_hGraphicsModePNG, m_hPNGMode, TranslateT("Enforce PNG output, possibly ignoring some column options"));
m_Options.insertRadio(m_hGraphicsModePNG, m_hPNGMode, TranslateT("Prefer HTML output over PNG output if available"));
- hTemp = m_Options.insertGroup(NULL, TranslateT("Miscellaneous"), OptionsCtrl::OCF_ROOTGROUP);
+ hTemp = m_Options.insertGroup(nullptr, TranslateT("Miscellaneous"), OptionsCtrl::OCF_ROOTGROUP);
m_hThreadLowPriority = m_Options.insertCheck(hTemp, TranslateT("Generate statistics in background thread with low priority"));
m_hPathToBrowser = m_Options.insertEdit(hTemp, TranslateT("Path to browser (leave blank for system default)"));
@@ -251,7 +251,7 @@ void DlgOption::SubGlobal::onWMInitDialog()
reinterpret_cast<INT_PTR>(protoList[i]->szModuleName)));
}
- m_Options.ensureVisible(NULL);
+ m_Options.ensureVisible(nullptr);
// init support info list
initSupportInfo();
diff --git a/plugins/HistoryStats/src/dlgoption_subinput.cpp b/plugins/HistoryStats/src/dlgoption_subinput.cpp
index e04765daa4..f87cf76cde 100644
--- a/plugins/HistoryStats/src/dlgoption_subinput.cpp
+++ b/plugins/HistoryStats/src/dlgoption_subinput.cpp
@@ -6,20 +6,20 @@
*/
DlgOption::SubInput::SubInput() :
- m_hChatSessionMinDur(NULL),
- m_hChatSessionTimeout(NULL),
- m_hAverageMinTime(NULL),
- m_hWordDelimiters(NULL),
- m_hMetaContactsMode(NULL),
- m_hMergeContacts(NULL),
- m_hMergeContactsGroups(NULL),
- m_hMergeMode(NULL),
- m_hProtocols(NULL),
- m_hIgnoreOlder(NULL),
- m_hIgnoreBefore(NULL),
- m_hIgnoreAfter(NULL),
- m_hFilterRawRTF(NULL),
- m_hFilterBBCodes(NULL)
+ m_hChatSessionMinDur(nullptr),
+ m_hChatSessionTimeout(nullptr),
+ m_hAverageMinTime(nullptr),
+ m_hWordDelimiters(nullptr),
+ m_hMetaContactsMode(nullptr),
+ m_hMergeContacts(nullptr),
+ m_hMergeContactsGroups(nullptr),
+ m_hMergeMode(nullptr),
+ m_hProtocols(nullptr),
+ m_hIgnoreOlder(nullptr),
+ m_hIgnoreBefore(nullptr),
+ m_hIgnoreAfter(nullptr),
+ m_hFilterRawRTF(nullptr),
+ m_hFilterBBCodes(nullptr)
{
}
@@ -68,16 +68,16 @@ void DlgOption::SubInput::onWMInitDialog()
// settings
OptionsCtrl::Item hTemp, hTemp2;
- hTemp = m_Options.insertGroup(NULL, TranslateT("History interpretation"), OptionsCtrl::OCF_ROOTGROUP);
+ hTemp = m_Options.insertGroup(nullptr, TranslateT("History interpretation"), OptionsCtrl::OCF_ROOTGROUP);
m_hChatSessionMinDur = m_Options.insertEdit(hTemp, TranslateT("Time a chat session must last to be counted (seconds)"), L"", OptionsCtrl::OCF_NUMBER);
m_hChatSessionTimeout = m_Options.insertEdit(hTemp, TranslateT("Time between two chat sessions (seconds)"), L"", OptionsCtrl::OCF_NUMBER);
m_hAverageMinTime = m_Options.insertEdit(hTemp, TranslateT("Minimum time to assume when calculating average (days)"), L"", OptionsCtrl::OCF_NUMBER);
m_hWordDelimiters = m_Options.insertEdit(hTemp, TranslateT("Word delimiting characters"));
- hTemp = m_Options.insertGroup(NULL, TranslateT("Contact filtering"), OptionsCtrl::OCF_ROOTGROUP | OptionsCtrl::OCF_NODISABLECHILDS);
+ hTemp = m_Options.insertGroup(nullptr, TranslateT("Contact filtering"), OptionsCtrl::OCF_ROOTGROUP | OptionsCtrl::OCF_NODISABLECHILDS);
m_hProtocols = m_Options.insertGroup(hTemp, TranslateT("Ignore all contacts with protocol..."));
hTemp2 = m_Options.insertGroup(hTemp, TranslateT("History read mode for metacontacts"), 0);
- m_hMetaContactsMode = m_Options.insertRadio(hTemp2, NULL, TranslateT("Use only metacontact's history"));
+ m_hMetaContactsMode = m_Options.insertRadio(hTemp2, nullptr, TranslateT("Use only metacontact's history"));
m_Options.insertRadio(hTemp2, m_hMetaContactsMode, TranslateT("Use only subcontacts' histories (for one metacontact)"));
m_Options.insertRadio(hTemp2, m_hMetaContactsMode, TranslateT("Use metacontact's history and its subcontacts' histories"));
m_Options.insertRadio(hTemp2, m_hMetaContactsMode, TranslateT("Treat metacontacts and subcontacts as normal contacts"));
@@ -85,10 +85,10 @@ void DlgOption::SubInput::onWMInitDialog()
m_hMergeContacts = m_Options.insertCheck(hTemp, TranslateT("Merge contacts with same name"), OptionsCtrl::OCF_DISABLECHILDSONUNCHECK);
m_hMergeContactsGroups = m_Options.insertCheck(m_hMergeContacts, TranslateT("Only merge if contacts are in the same group"));
hTemp2 = m_Options.insertGroup(hTemp, TranslateT("Duplicate detection when reading merged contacts"));
- m_hMergeMode = m_Options.insertRadio(hTemp2, NULL, TranslateT("Merge events (tolerant)"));
+ m_hMergeMode = m_Options.insertRadio(hTemp2, nullptr, TranslateT("Merge events (tolerant)"));
m_Options.insertRadio(hTemp2, m_hMergeMode, TranslateT("Merge events (strict)"));
m_Options.insertRadio(hTemp2, m_hMergeMode, TranslateT("Don't merge events"));
- hTemp = m_Options.insertGroup(NULL, TranslateT("Message filtering"), OptionsCtrl::OCF_ROOTGROUP);
+ hTemp = m_Options.insertGroup(nullptr, TranslateT("Message filtering"), OptionsCtrl::OCF_ROOTGROUP);
hTemp2 = m_Options.insertGroup(hTemp, TranslateT("Ignore messages..."));
m_hIgnoreOlder = m_Options.insertEdit(hTemp2, TranslateT("...older than (days, 0=no limit)"), L"", OptionsCtrl::OCF_NUMBER);
m_hIgnoreBefore = m_Options.insertDateTime(hTemp2, TranslateT("...before date (none=no limit)"), 0, L"%Y-%m-%d", OptionsCtrl::OCF_ALLOWNONE);
@@ -115,7 +115,7 @@ void DlgOption::SubInput::onWMInitDialog()
if (!RTFFilter::available())
m_Options.enableItem(m_hFilterRawRTF, false);
- m_Options.ensureVisible(NULL);
+ m_Options.ensureVisible(nullptr);
}
void DlgOption::SubInput::loadSettings()
diff --git a/plugins/HistoryStats/src/dlgoption_suboutput.cpp b/plugins/HistoryStats/src/dlgoption_suboutput.cpp
index 97be76691a..bd20a1744e 100644
--- a/plugins/HistoryStats/src/dlgoption_suboutput.cpp
+++ b/plugins/HistoryStats/src/dlgoption_suboutput.cpp
@@ -6,46 +6,46 @@
*/
DlgOption::SubOutput::SubOutput() :
- m_hRemoveEmptyContacts(NULL),
- m_hRemoveInChatsZero(NULL),
- m_hRemoveInBytesZero(NULL),
- m_hRemoveOutChatsZero(NULL),
- m_hRemoveOutBytesZero(NULL),
- m_hOmitContacts(NULL),
- m_hOmitByValue(NULL),
- m_hOmitByValueData(NULL),
- m_hOmitByValueLimit(NULL),
- m_hOmitByTime(NULL),
- m_hOmitByTimeDays(NULL),
- m_hOmitByRank(NULL),
- m_hOmitNumOnTop(NULL),
- m_hOmittedInTotals(NULL),
- m_hOmittedInExtraRow(NULL),
- m_hCalcTotals(NULL),
- m_hTableHeader(NULL),
- m_hTableHeaderRepeat(NULL),
- m_hTableHeaderVerbose(NULL),
- m_hHeaderTooltips(NULL),
- m_hHeaderTooltipsIfCustom(NULL),
- m_hSort(NULL),
- m_hNick(NULL),
- m_hOutputVariables(NULL),
- m_hOutputFile(NULL),
- m_hOutputExtraToFolder(NULL),
- m_hOutputExtraFolder(NULL),
- m_hOverwriteAlways(NULL),
- m_hAutoOpenOptions(NULL),
- m_hAutoOpenStartup(NULL),
- m_hAutoOpenMenu(NULL)
+ m_hRemoveEmptyContacts(nullptr),
+ m_hRemoveInChatsZero(nullptr),
+ m_hRemoveInBytesZero(nullptr),
+ m_hRemoveOutChatsZero(nullptr),
+ m_hRemoveOutBytesZero(nullptr),
+ m_hOmitContacts(nullptr),
+ m_hOmitByValue(nullptr),
+ m_hOmitByValueData(nullptr),
+ m_hOmitByValueLimit(nullptr),
+ m_hOmitByTime(nullptr),
+ m_hOmitByTimeDays(nullptr),
+ m_hOmitByRank(nullptr),
+ m_hOmitNumOnTop(nullptr),
+ m_hOmittedInTotals(nullptr),
+ m_hOmittedInExtraRow(nullptr),
+ m_hCalcTotals(nullptr),
+ m_hTableHeader(nullptr),
+ m_hTableHeaderRepeat(nullptr),
+ m_hTableHeaderVerbose(nullptr),
+ m_hHeaderTooltips(nullptr),
+ m_hHeaderTooltipsIfCustom(nullptr),
+ m_hSort(nullptr),
+ m_hNick(nullptr),
+ m_hOutputVariables(nullptr),
+ m_hOutputFile(nullptr),
+ m_hOutputExtraToFolder(nullptr),
+ m_hOutputExtraFolder(nullptr),
+ m_hOverwriteAlways(nullptr),
+ m_hAutoOpenOptions(nullptr),
+ m_hAutoOpenStartup(nullptr),
+ m_hAutoOpenMenu(nullptr)
{
array_each_(i, m_hSortBy)
{
- m_hSortBy[i] = NULL;
+ m_hSortBy[i] = nullptr;
}
array_each_(i, m_hSortDir)
{
- m_hSortDir[i] = NULL;
+ m_hSortDir[i] = nullptr;
}
}
@@ -98,7 +98,7 @@ void DlgOption::SubOutput::onWMInitDialog()
OptionsCtrl::Item hTemp;
OptionsCtrl::Item hTemp2;
- hTemp = m_Options.insertGroup(NULL, TranslateT("Contact filtering and totals"), OptionsCtrl::OCF_ROOTGROUP | OptionsCtrl::OCF_NODISABLECHILDS);
+ hTemp = m_Options.insertGroup(nullptr, TranslateT("Contact filtering and totals"), OptionsCtrl::OCF_ROOTGROUP | OptionsCtrl::OCF_NODISABLECHILDS);
m_hRemoveEmptyContacts = m_Options.insertCheck(hTemp, TranslateT("Remove contacts with empty history"));
m_hRemoveOutChatsZero = m_Options.insertCheck(hTemp, TranslateT("Remove contacts with only incoming chats"), OptionsCtrl::OCF_DISABLECHILDSONUNCHECK);
m_hRemoveOutBytesZero = m_Options.insertCheck(m_hRemoveOutChatsZero, TranslateT("Remove only if you never answered"));
@@ -116,14 +116,14 @@ void DlgOption::SubOutput::onWMInitDialog()
m_hOmittedInTotals = m_Options.insertCheck(m_hOmitContacts, TranslateT("Include omitted contacts in totals"));
m_hOmittedInExtraRow = m_Options.insertCheck(m_hOmitContacts, TranslateT("Include totals of omitted contacts in additional row"));
m_hCalcTotals = m_Options.insertCheck(hTemp, TranslateT("Include totals in statistics"));
- hTemp = m_Options.insertGroup(NULL, TranslateT("Table header"), OptionsCtrl::OCF_ROOTGROUP | OptionsCtrl::OCF_NODISABLECHILDS);
+ hTemp = m_Options.insertGroup(nullptr, TranslateT("Table header"), OptionsCtrl::OCF_ROOTGROUP | OptionsCtrl::OCF_NODISABLECHILDS);
m_hTableHeader = m_Options.insertCheck(hTemp, TranslateT("Output header"), OptionsCtrl::OCF_DISABLECHILDSONUNCHECK | OptionsCtrl::OCF_DISABLED | OptionsCtrl::OCF_NODISABLECHILDS);
m_hTableHeaderRepeat = m_Options.insertEdit(m_hTableHeader, TranslateT("Repeat header every n contacts (0=don't repeat)"), L"0", OptionsCtrl::OCF_NUMBER);
m_hTableHeaderVerbose = m_Options.insertCheck(m_hTableHeader, TranslateT("Make column titles more verbose"));
m_hHeaderTooltips = m_Options.insertCheck(m_hTableHeader, TranslateT("Show tooltips with detailed information in column titles"), OptionsCtrl::OCF_DISABLECHILDSONUNCHECK);
m_hHeaderTooltipsIfCustom = m_Options.insertCheck(m_hHeaderTooltips, TranslateT("Only show if a custom title was entered or if titles are not verbose"));
- m_hSort = m_Options.insertGroup(NULL, TranslateT("Sorting"), OptionsCtrl::OCF_ROOTGROUP);
- hTemp = m_Options.insertGroup(NULL, TranslateT("HTML file generation"), OptionsCtrl::OCF_ROOTGROUP);
+ m_hSort = m_Options.insertGroup(nullptr, TranslateT("Sorting"), OptionsCtrl::OCF_ROOTGROUP);
+ hTemp = m_Options.insertGroup(nullptr, TranslateT("HTML file generation"), OptionsCtrl::OCF_ROOTGROUP);
m_hNick = m_Options.insertEdit(hTemp, TranslateT("Own nick for statistics"));
hTemp2 = m_Options.insertGroup(hTemp, TranslateT("Output files and folders"));
m_hOutputVariables = m_Options.insertCheck(hTemp2, TranslateT("Substitute variables in output file name and subfolder for additional files"));
@@ -200,7 +200,7 @@ void DlgOption::SubOutput::onWMInitDialog()
m_Options.addComboItem(m_hSortBy[i], TranslateW(sortKeys[j].desc));
}
- m_hSortDir[i] = m_Options.insertRadio(m_hSortBy[i], NULL, TranslateT("Ascending"));
+ m_hSortDir[i] = m_Options.insertRadio(m_hSortBy[i], nullptr, TranslateT("Ascending"));
m_Options.insertRadio(m_hSortBy[i], m_hSortDir[i], TranslateT("Descending"));
}
@@ -232,7 +232,7 @@ void DlgOption::SubOutput::onWMInitDialog()
m_Options.addComboItem(m_hOmitByValueData, TranslateW(omitData[i]));
}
- m_Options.ensureVisible(NULL);
+ m_Options.ensureVisible(nullptr);
}
void DlgOption::SubOutput::loadSettings()
diff --git a/plugins/HistoryStats/src/iconlib.cpp b/plugins/HistoryStats/src/iconlib.cpp
index d8a6dc5417..0fa5d6a40e 100644
--- a/plugins/HistoryStats/src/iconlib.cpp
+++ b/plugins/HistoryStats/src/iconlib.cpp
@@ -5,15 +5,15 @@
#include "resource.h"
bool IconLib::m_bIcoLibAvailable = false;
-HANDLE IconLib::m_hHookSkin2IconsChanged = NULL;
+HANDLE IconLib::m_hHookSkin2IconsChanged = nullptr;
IconLib::IconInfo IconLib::m_IconInfo[] = {
- { IDI_HISTORYSTATS , "main_menu" , NULL, LPGENW("Create statistics (main menu)") },
- { IDI_HISTORYSTATS , "menu_show" , NULL, LPGENW("Show statistics (main menu)") },
- { IDI_HISTORYSTATS , "menu_config" , NULL, LPGENW("Configure... (main menu)") },
- { IDI_HISTORYSTATS , "contact_menu" , NULL, LPGENW("Contact menu") },
- { IDI_EXCLUDE_NO , "exclude_no" , NULL, LPGENW("Unexcluded contacts") },
- { IDI_EXCLUDE_YES , "exclude_yes" , NULL, LPGENW("Excluded contacts") },
+ { IDI_HISTORYSTATS , "main_menu" , nullptr, LPGENW("Create statistics (main menu)") },
+ { IDI_HISTORYSTATS , "menu_show" , nullptr, LPGENW("Show statistics (main menu)") },
+ { IDI_HISTORYSTATS , "menu_config" , nullptr, LPGENW("Configure... (main menu)") },
+ { IDI_HISTORYSTATS , "contact_menu" , nullptr, LPGENW("Contact menu") },
+ { IDI_EXCLUDE_NO , "exclude_no" , nullptr, LPGENW("Unexcluded contacts") },
+ { IDI_EXCLUDE_YES , "exclude_yes" , nullptr, LPGENW("Excluded contacts") },
{ IDI_TREE_CHECK1 , "tree_check1" , LPGENW("Options tree"), LPGENW("Checkbox") },
{ IDI_TREE_CHECK2 , "tree_check2" , LPGENW("Options tree"), LPGENW("Checkbox (checked)") },
{ IDI_TREE_CHECK3 , "tree_check3" , LPGENW("Options tree"), LPGENW("Checkbox (disabled)") },
@@ -52,7 +52,7 @@ void IconLib::init()
{
array_each_(i, m_IconInfo)
{
- m_IconInfo[i].hIcon = NULL;
+ m_IconInfo[i].hIcon = nullptr;
}
if (m_bIcoLibAvailable = mu::icolib::_available()) {
@@ -124,7 +124,7 @@ void IconLib::uninit()
{
if (m_IconInfo[i].hIcon) {
DestroyIcon(m_IconInfo[i].hIcon);
- m_IconInfo[i].hIcon = NULL;
+ m_IconInfo[i].hIcon = nullptr;
}
}
}
diff --git a/plugins/HistoryStats/src/main.cpp b/plugins/HistoryStats/src/main.cpp
index 19f1a84612..202a6fcea0 100644
--- a/plugins/HistoryStats/src/main.cpp
+++ b/plugins/HistoryStats/src/main.cpp
@@ -31,17 +31,17 @@ PLUGININFOEX g_pluginInfoEx = {
{0xf184f5a0, 0xc198, 0x4454, {0xa9, 0xb4, 0xf6, 0xe2, 0xfd, 0x53, 0x41, 0x33}},
};
-SettingsSerializer* g_pSettings = NULL;
+SettingsSerializer* g_pSettings = nullptr;
bool g_bMainMenuExists = false;
bool g_bContactMenuExists = false;
bool g_bExcludeLock = false;
bool g_bConfigureLock = false;
-static HGENMENU g_hMenuCreateStatistics = NULL;
-static HGENMENU g_hMenuShowStatistics = NULL;
-static HGENMENU g_hMenuConfigure = NULL;
-static HGENMENU g_hMenuToggleExclude = NULL;
+static HGENMENU g_hMenuCreateStatistics = nullptr;
+static HGENMENU g_hMenuShowStatistics = nullptr;
+static HGENMENU g_hMenuConfigure = nullptr;
+static HGENMENU g_hMenuToggleExclude = nullptr;
#if defined(HISTORYSTATS_HISTORYCOPY)
static HGENMENU g_hMenuHistoryCopy = NULL;
@@ -93,16 +93,16 @@ static INT_PTR SvcSetExclude(WPARAM hContact, LPARAM lParam)
static void MenuIconsChanged(LPARAM)
{
if (g_hMenuCreateStatistics)
- Menu_ModifyItem(g_hMenuCreateStatistics, NULL, IconLib::getIcon(IconLib::iiMenuCreateStatistics));
+ Menu_ModifyItem(g_hMenuCreateStatistics, nullptr, IconLib::getIcon(IconLib::iiMenuCreateStatistics));
if (g_hMenuShowStatistics)
- Menu_ModifyItem(g_hMenuShowStatistics, NULL, IconLib::getIcon(IconLib::iiMenuShowStatistics));
+ Menu_ModifyItem(g_hMenuShowStatistics, nullptr, IconLib::getIcon(IconLib::iiMenuShowStatistics));
if (g_hMenuConfigure)
- Menu_ModifyItem(g_hMenuConfigure, NULL, IconLib::getIcon(IconLib::iiMenuConfigure));
+ Menu_ModifyItem(g_hMenuConfigure, nullptr, IconLib::getIcon(IconLib::iiMenuConfigure));
if (g_hMenuToggleExclude)
- Menu_ModifyItem(g_hMenuToggleExclude, NULL, IconLib::getIcon(IconLib::iiContactMenu));
+ Menu_ModifyItem(g_hMenuToggleExclude, nullptr, IconLib::getIcon(IconLib::iiContactMenu));
}
/////////////////////////////////////////////////////////////////////////////////////////
@@ -119,7 +119,7 @@ static INT_PTR MenuShowStatistics(WPARAM, LPARAM)
if (g_pSettings->canShowStatistics())
g_pSettings->showStatistics();
else
- MessageBox(NULL,
+ MessageBox(nullptr,
TranslateT("The statistics can't be found. Either you never created them or the last created statistics were moved to a different location and can't be found anymore."),
TranslateT("HistoryStats - Warning"), MB_ICONWARNING | MB_OK);
@@ -145,7 +145,7 @@ void AddMainMenu()
CreateServiceFunction(con::SvcShowStatistics, MenuShowStatistics);
CreateServiceFunction(con::SvcConfigure, MenuConfigure);
- HGENMENU hRoot = bInPopup ? Menu_CreateRoot(MO_MAIN, LPGENW("Statistics"), 1910000000) : NULL;
+ HGENMENU hRoot = bInPopup ? Menu_CreateRoot(MO_MAIN, LPGENW("Statistics"), 1910000000) : nullptr;
Menu_ConfigureItem(hRoot, MCI_OPT_UID, "7F116B24-9D84-4D04-B6AA-EED95051A184");
g_hMenuCreateStatistics = mu::clist::addMainMenuItem(
@@ -339,7 +339,7 @@ static int EventOptInitialise(WPARAM wParam, LPARAM)
wParam,
TranslateT("History"),
TranslateT("Statistics"),
- NULL,
+ nullptr,
DlgOption::staticDlgProc,
MAKEINTRESOURCEA(IDD_OPTIONS),
g_hInst);
@@ -406,13 +406,13 @@ extern "C" __declspec(dllexport) int Load()
pcli = Clist_GetInterface();
// init COM, needed for GUID generation
- CoInitialize(NULL);
+ CoInitialize(nullptr);
// register our own window classes
if (!BandCtrlImpl::registerClass() || !OptionsCtrlImpl::registerClass())
{
MessageBox(
- 0,
+ nullptr,
L"Failed to register a required window class. Can't continue loading plugin.",
L"HistoryStats - Error",
MB_OK | MB_ICONERROR);
@@ -424,7 +424,7 @@ extern "C" __declspec(dllexport) int Load()
if (!mu::load())
{
MessageBox(
- 0,
+ nullptr,
L"This version of HistoryStats isn't compatible with your Miranda NG "
L"version. Possibly, your Miranda NG is outdated or you are trying to "
L"use the Unicode version with a non-Unicode Miranda NG.\r\n\r\n"
diff --git a/plugins/HistoryStats/src/mirandacontact.cpp b/plugins/HistoryStats/src/mirandacontact.cpp
index f217bb5bb7..66de169919 100644
--- a/plugins/HistoryStats/src/mirandacontact.cpp
+++ b/plugins/HistoryStats/src/mirandacontact.cpp
@@ -46,7 +46,7 @@ void MirandaContact::stripMetaID(DBEVENTINFO& dbe)
if (dbe.cbBlob >= 6 && !pTextBegin[dbe.cbBlob - 1]) {
char* pIDEnd = pTextBegin + dbe.cbBlob - 1;
char* pIDBegin = pIDEnd;
- char* pIDSep = NULL;
+ char* pIDSep = nullptr;
while (pIDBegin >= pTextBegin + 2 && *--pIDBegin)
if (*pIDBegin == '*')
@@ -104,7 +104,7 @@ void MirandaContact::beginRead()
ci.hContact = m_Sources[j];
ci.hEvent = db_event_first(ci.hContact);
- ci.ei.dbe.pBlob = NULL;
+ ci.ei.dbe.pBlob = nullptr;
ci.ei.nAllocated = 0;
fetchSlot(j);
@@ -209,7 +209,7 @@ void MirandaContactTolerantMerge::fillQueue()
m_SpareEIs.pop_front();
}
else {
- ci.ei.dbe.pBlob = NULL;
+ ci.ei.dbe.pBlob = nullptr;
ci.ei.nAllocated = 0;
}
}
@@ -273,7 +273,7 @@ void MirandaContactStrictMerge::fillQueue()
m_SpareEIs.pop_front();
}
else {
- ci.ei.dbe.pBlob = NULL;
+ ci.ei.dbe.pBlob = nullptr;
ci.ei.nAllocated = 0;
}
}
@@ -310,7 +310,7 @@ void MirandaContactNoMerge::fillQueue()
m_SpareEIs.pop_front();
}
else {
- ci.ei.dbe.pBlob = NULL;
+ ci.ei.dbe.pBlob = nullptr;
ci.ei.nAllocated = 0;
}
@@ -335,6 +335,6 @@ MirandaContact* MirandaContactFactory::makeMirandaContact(int MergeMode, const e
return new MirandaContactNoMerge(strNick, strProtocol, strGroup, sources);
default:
- return 0;
+ return nullptr;
}
}
diff --git a/plugins/HistoryStats/src/mu_common.cpp b/plugins/HistoryStats/src/mu_common.cpp
index 62c9e21bb0..212485233a 100644
--- a/plugins/HistoryStats/src/mu_common.cpp
+++ b/plugins/HistoryStats/src/mu_common.cpp
@@ -56,7 +56,7 @@ namespace mu
void addIcon(const wchar_t* szSection, const wchar_t* szDescription, const char* szIconName, const char* szDefaultFile, int iDefaultIndex)
{
- SKINICONDESC sid = { 0 };
+ SKINICONDESC sid = {};
sid.section.w = const_cast<wchar_t*>(szSection);
sid.description.w = const_cast<wchar_t*>(szDescription);
sid.pszName = const_cast<char*>(szIconName);
@@ -148,14 +148,14 @@ namespace mu
char* wideToAnsiDup(const WCHAR* pszWide, UINT uCP /* = CP_ACP */)
{
if (!pszWide)
- return NULL;
+ return nullptr;
- int len = WideCharToMultiByte(uCP, 0, pszWide, -1, NULL, 0, NULL, NULL);
+ int len = WideCharToMultiByte(uCP, 0, pszWide, -1, nullptr, 0, nullptr, nullptr);
char* result = reinterpret_cast<char*>(malloc(sizeof(char)* len));
if (!result)
- return NULL;
+ return nullptr;
- WideCharToMultiByte(uCP, 0, pszWide, -1, result, len, NULL, NULL);
+ WideCharToMultiByte(uCP, 0, pszWide, -1, result, len, nullptr, nullptr);
result[len - 1] = 0;
return result;
}
@@ -163,12 +163,12 @@ namespace mu
WCHAR* ansiToWideDup(const char* pszAnsi, UINT uCP /* = CP_ACP */)
{
if (!pszAnsi)
- return NULL;
+ return nullptr;
- int len = MultiByteToWideChar(uCP, 0, pszAnsi, -1, NULL, 0);
+ int len = MultiByteToWideChar(uCP, 0, pszAnsi, -1, nullptr, 0);
WCHAR* result = reinterpret_cast<WCHAR*>(malloc(sizeof(WCHAR)* len));
if (!result)
- return NULL;
+ return nullptr;
MultiByteToWideChar(uCP, 0, pszAnsi, -1, result, len);
result[len - 1] = 0;
@@ -178,16 +178,16 @@ namespace mu
char* wideToAnsi(const WCHAR* pszWide, char* pszRes, int maxLen, UINT uCP /* = CP_ACP */)
{
if (!pszWide)
- return NULL;
+ return nullptr;
- WideCharToMultiByte(uCP, 0, pszWide, -1, pszRes, maxLen, NULL, NULL);
+ WideCharToMultiByte(uCP, 0, pszWide, -1, pszRes, maxLen, nullptr, nullptr);
return pszRes;
}
WCHAR* ansiToWide(const char* pszAnsi, WCHAR* pszRes, int maxLen, UINT uCP /* = CP_ACP */)
{
if (!pszAnsi)
- return NULL;
+ return nullptr;
MultiByteToWideChar(uCP, 0, pszAnsi, -1, pszRes, maxLen);
return pszRes;
diff --git a/plugins/HistoryStats/src/optionsctrlimpl.cpp b/plugins/HistoryStats/src/optionsctrlimpl.cpp
index 95c17cd380..9b4a1333e8 100644
--- a/plugins/HistoryStats/src/optionsctrlimpl.cpp
+++ b/plugins/HistoryStats/src/optionsctrlimpl.cpp
@@ -9,7 +9,7 @@
*/
const wchar_t* OptionsCtrlImpl::m_ClassName = L"HistoryStatsOptions";
-HIMAGELIST OptionsCtrlImpl::m_hStateIcons = NULL;
+HIMAGELIST OptionsCtrlImpl::m_hStateIcons = nullptr;
int OptionsCtrlImpl::m_nStateIconsRef = 0;
LRESULT CALLBACK OptionsCtrlImpl::staticWndProc(HWND hWnd, UINT msg, WPARAM wParam, LPARAM lParam)
@@ -56,7 +56,7 @@ LRESULT CALLBACK OptionsCtrlImpl::staticWndProc(HWND hWnd, UINT msg, WPARAM wPar
case WM_WINDOWPOSCHANGED:
{
WINDOWPOS* pWP = reinterpret_cast<WINDOWPOS*>(lParam);
- SetWindowPos(pCtrl->m_hTree, NULL, 0, 0, pWP->cx, pWP->cy, SWP_NOMOVE | SWP_NOZORDER | SWP_NOACTIVATE);
+ SetWindowPos(pCtrl->m_hTree, nullptr, 0, 0, pWP->cx, pWP->cy, SWP_NOMOVE | SWP_NOZORDER | SWP_NOACTIVATE);
}
return 0;
@@ -346,7 +346,7 @@ void OptionsCtrlImpl::staticFreeStateImages()
IconLib::unregisterCallback(staticUpdateStateImages, 0);
ImageList_Destroy(m_hStateIcons);
- m_hStateIcons = NULL;
+ m_hStateIcons = nullptr;
}
}
@@ -390,12 +390,12 @@ bool OptionsCtrlImpl::registerClass()
0, // cbClsExtra
sizeof(OptionsCtrlImpl*), // cbWndExtra
g_hInst, // hInstance
- NULL, // hIcon
- NULL, // hCursor
- NULL, // hbrBackground
- NULL, // lpszMenuName
+ nullptr, // hIcon
+ nullptr, // hCursor
+ nullptr, // hbrBackground
+ nullptr, // lpszMenuName
m_ClassName, // lpszClassName
- NULL // hIconSm
+ nullptr // hIconSm
};
if (!RegisterClassEx(&wcx))
@@ -416,7 +416,7 @@ void OptionsCtrlImpl::unregisterClass()
}
OptionsCtrlImpl::OptionsCtrlImpl(HWND hWnd, UINT_PTR nOwnId) :
- m_hWnd(hWnd), m_nOwnId(nOwnId), m_hTree(NULL), m_pfnOldTreeProc(NULL), m_bModified(true), m_hDragItem(NULL)
+ m_hWnd(hWnd), m_nOwnId(nOwnId), m_hTree(nullptr), m_pfnOldTreeProc(nullptr), m_bModified(true), m_hDragItem(nullptr)
{
}
@@ -443,7 +443,7 @@ LRESULT OptionsCtrlImpl::onWMCreate(CREATESTRUCT* pCS)
m_hWnd,
reinterpret_cast<HMENU>(ccTree),
g_hInst,
- NULL);
+ nullptr);
if (!m_hTree)
return -1;
@@ -468,11 +468,11 @@ void OptionsCtrlImpl::onWMDestroy()
// undo subclassing of tree view
SetWindowLongPtr(m_hTree, GWLP_WNDPROC, reinterpret_cast<LONG_PTR>(m_pfnOldTreeProc));
- m_pfnOldTreeProc = NULL;
+ m_pfnOldTreeProc = nullptr;
// destroy tree view before invalidating 'this'
DestroyWindow(m_hTree);
- m_hTree = NULL;
+ m_hTree = nullptr;
}
void OptionsCtrlImpl::onNMClick()
@@ -547,7 +547,7 @@ void OptionsCtrlImpl::onTVNDeleteItem(NMTREEVIEW* pNMTreeView)
nmoc.hdr.code = OCN_SELCHANGING;
nmoc.hdr.hwndFrom = m_hWnd;
nmoc.hdr.idFrom = m_nOwnId;
- nmoc.hItem = 0;
+ nmoc.hItem = nullptr;
nmoc.dwData = 0;
SendMessage(GetParent(m_hWnd), WM_NOTIFY, nmoc.hdr.idFrom, reinterpret_cast<LPARAM>(&nmoc));
@@ -559,7 +559,7 @@ void OptionsCtrlImpl::onTVNDeleteItem(NMTREEVIEW* pNMTreeView)
// do actual delete
Item* pItem = getItem(pNMTreeView->itemOld.hItem);
- setItem(pNMTreeView->itemOld.hItem, NULL);
+ setItem(pNMTreeView->itemOld.hItem, nullptr);
pItem->onDeselect();
@@ -638,7 +638,7 @@ void OptionsCtrlImpl::onWMLButtonUp(const POINT& pt)
HTREEITEM hDragItem = m_hDragItem;
TreeView_SetInsertMark(m_hTree, NULL, FALSE);
- m_hDragItem = NULL;
+ m_hDragItem = nullptr;
ReleaseCapture();
// check for drop target and handle
@@ -773,7 +773,7 @@ HTREEITEM OptionsCtrlImpl::onOCMInsertGroup(HTREEITEM hParent, OCGROUP* pGroup)
assert(pGroup);
assert(pGroup->szLabel);
- return (new Group(this, hParent ? getItem(hParent) : NULL, pGroup->szLabel, pGroup->dwFlags, pGroup->dwData))->m_hItem;
+ return (new Group(this, hParent ? getItem(hParent) : nullptr, pGroup->szLabel, pGroup->dwFlags, pGroup->dwData))->m_hItem;
}
HTREEITEM OptionsCtrlImpl::onOCMInsertCheck(HTREEITEM hParent, OCCHECK* pCheck)
@@ -781,7 +781,7 @@ HTREEITEM OptionsCtrlImpl::onOCMInsertCheck(HTREEITEM hParent, OCCHECK* pCheck)
assert(pCheck);
assert(pCheck->szLabel);
- return (new Check(this, hParent ? getItem(hParent) : NULL, pCheck->szLabel, pCheck->dwFlags, pCheck->dwData))->m_hItem;
+ return (new Check(this, hParent ? getItem(hParent) : nullptr, pCheck->szLabel, pCheck->dwFlags, pCheck->dwData))->m_hItem;
}
HTREEITEM OptionsCtrlImpl::onOCMInsertRadio(HTREEITEM hParent, OCRADIO* pRadio)
@@ -789,11 +789,11 @@ HTREEITEM OptionsCtrlImpl::onOCMInsertRadio(HTREEITEM hParent, OCRADIO* pRadio)
assert(pRadio);
assert(pRadio->szLabel);
- Item* pSibling = pRadio->hSibling ? getItem(reinterpret_cast<HTREEITEM>(pRadio->hSibling)) : NULL;
+ Item* pSibling = pRadio->hSibling ? getItem(reinterpret_cast<HTREEITEM>(pRadio->hSibling)) : nullptr;
assert(!pSibling || pSibling->m_ItemType == itRadio);
- return (new Radio(this, hParent ? getItem(hParent) : NULL, reinterpret_cast<Radio*>(pSibling), pRadio->szLabel, pRadio->dwFlags, pRadio->dwData))->m_hItem;
+ return (new Radio(this, hParent ? getItem(hParent) : nullptr, reinterpret_cast<Radio*>(pSibling), pRadio->szLabel, pRadio->dwFlags, pRadio->dwData))->m_hItem;
}
HTREEITEM OptionsCtrlImpl::onOCMInsertEdit(HTREEITEM hParent, OCEDIT* pEdit)
@@ -802,7 +802,7 @@ HTREEITEM OptionsCtrlImpl::onOCMInsertEdit(HTREEITEM hParent, OCEDIT* pEdit)
assert(pEdit->szLabel);
assert(pEdit->szEdit);
- return (new Edit(this, hParent ? getItem(hParent) : NULL, pEdit->szLabel, pEdit->szEdit, pEdit->dwFlags, pEdit->dwData))->m_hItem;
+ return (new Edit(this, hParent ? getItem(hParent) : nullptr, pEdit->szLabel, pEdit->szEdit, pEdit->dwFlags, pEdit->dwData))->m_hItem;
}
HTREEITEM OptionsCtrlImpl::onOCMInsertCombo(HTREEITEM hParent, OCCOMBO* pCombo)
@@ -810,7 +810,7 @@ HTREEITEM OptionsCtrlImpl::onOCMInsertCombo(HTREEITEM hParent, OCCOMBO* pCombo)
assert(pCombo);
assert(pCombo->szLabel);
- return (new Combo(this, hParent ? getItem(hParent) : NULL, pCombo->szLabel, pCombo->dwFlags, pCombo->dwData))->m_hItem;
+ return (new Combo(this, hParent ? getItem(hParent) : nullptr, pCombo->szLabel, pCombo->dwFlags, pCombo->dwData))->m_hItem;
}
HTREEITEM OptionsCtrlImpl::onOCMInsertButton(HTREEITEM hParent, OCBUTTON* pButton)
@@ -819,7 +819,7 @@ HTREEITEM OptionsCtrlImpl::onOCMInsertButton(HTREEITEM hParent, OCBUTTON* pButto
assert(pButton->szLabel);
assert(pButton->szButton);
- return (new Button(this, hParent ? getItem(hParent) : NULL, pButton->szLabel, pButton->szButton, pButton->dwFlags, pButton->dwData))->m_hItem;
+ return (new Button(this, hParent ? getItem(hParent) : nullptr, pButton->szLabel, pButton->szButton, pButton->dwFlags, pButton->dwData))->m_hItem;
}
HTREEITEM OptionsCtrlImpl::onOCMInsertDateTime(HTREEITEM hParent, OCDATETIME* pDateTime)
@@ -828,7 +828,7 @@ HTREEITEM OptionsCtrlImpl::onOCMInsertDateTime(HTREEITEM hParent, OCDATETIME* pD
assert(pDateTime->szLabel);
assert(pDateTime->szFormat);
- return (new DateTime(this, hParent ? getItem(hParent) : NULL, pDateTime->szLabel, pDateTime->szFormat, pDateTime->dwDateTime, pDateTime->dwFlags, pDateTime->dwData))->m_hItem;
+ return (new DateTime(this, hParent ? getItem(hParent) : nullptr, pDateTime->szLabel, pDateTime->szFormat, pDateTime->dwDateTime, pDateTime->dwFlags, pDateTime->dwData))->m_hItem;
}
HTREEITEM OptionsCtrlImpl::onOCMInsertColor(HTREEITEM hParent, OCCOLOR* pColor)
@@ -836,7 +836,7 @@ HTREEITEM OptionsCtrlImpl::onOCMInsertColor(HTREEITEM hParent, OCCOLOR* pColor)
assert(pColor);
assert(pColor->szLabel);
- return (new Color(this, hParent ? getItem(hParent) : NULL, pColor->szLabel, pColor->crColor, pColor->dwFlags, pColor->dwData))->m_hItem;
+ return (new Color(this, hParent ? getItem(hParent) : nullptr, pColor->szLabel, pColor->crColor, pColor->dwFlags, pColor->dwData))->m_hItem;
}
const wchar_t* OptionsCtrlImpl::onOCMGetItemLabel(HTREEITEM hItem)
@@ -1015,7 +1015,7 @@ HTREEITEM OptionsCtrlImpl::onOCMGetItem(HTREEITEM hItem, DWORD dwFlag)
return TreeView_GetPrevSibling(m_hTree, hItem);
default:
- return NULL;
+ return nullptr;
}
}
@@ -1152,7 +1152,7 @@ bool OptionsCtrlImpl::isItemValid(HTREEITEM hItem)
TVITEM tvi;
tvi.mask = TVIF_HANDLE | TVIF_PARAM;
tvi.hItem = hItem;
- Item* pItem = TreeView_GetItem(m_hTree, &tvi) ? reinterpret_cast<Item*>(tvi.lParam) : NULL;
+ Item* pItem = TreeView_GetItem(m_hTree, &tvi) ? reinterpret_cast<Item*>(tvi.lParam) : nullptr;
return bool_(pItem);
}
@@ -1164,7 +1164,7 @@ OptionsCtrlImpl::Item* OptionsCtrlImpl::getItem(HTREEITEM hItem)
TVITEM tvi;
tvi.mask = TVIF_HANDLE | TVIF_PARAM;
tvi.hItem = hItem;
- Item* pItem = TreeView_GetItem(m_hTree, &tvi) ? reinterpret_cast<Item*>(tvi.lParam) : NULL;
+ Item* pItem = TreeView_GetItem(m_hTree, &tvi) ? reinterpret_cast<Item*>(tvi.lParam) : nullptr;
assert(pItem);
diff --git a/plugins/HistoryStats/src/optionsctrlimpl_button.cpp b/plugins/HistoryStats/src/optionsctrlimpl_button.cpp
index 868fa46436..ebf47ae9ba 100644
--- a/plugins/HistoryStats/src/optionsctrlimpl_button.cpp
+++ b/plugins/HistoryStats/src/optionsctrlimpl_button.cpp
@@ -9,7 +9,7 @@
OptionsCtrlImpl::Button::Button(OptionsCtrlImpl* pCtrl, Item* pParent, const wchar_t* szLabel, const wchar_t* szButton, DWORD dwFlags, INT_PTR dwData)
: Item(pCtrl, itButton, szLabel, dwFlags, dwData)
- , m_hButtonWnd(NULL)
+ , m_hButtonWnd(nullptr)
, m_strButton(szButton)
{
m_pCtrl->insertItem(pParent, this, m_strLabel.c_str(), dwFlags, m_bEnabled ? siButton : siButtonG);
@@ -47,7 +47,7 @@ void OptionsCtrlImpl::Button::onSelect()
if (hTempWnd = CreateWindowEx(
0, WC_BUTTON, m_strButton.c_str(), dwStyle,
r.left, r.top, r.right - r.left, r.bottom - r.top,
- m_pCtrl->m_hTree, reinterpret_cast<HMENU>(ccButton), g_hInst, NULL))
+ m_pCtrl->m_hTree, reinterpret_cast<HMENU>(ccButton), g_hInst, nullptr))
{
SendMessage(hTempWnd, WM_SETFONT, reinterpret_cast<WPARAM>(hTreeFront), MAKELPARAM(TRUE, 0));
@@ -74,9 +74,9 @@ void OptionsCtrlImpl::Button::onDeselect()
m_pCtrl->setNodeText(m_hItem, m_strLabel.c_str());
DestroyWindow(m_hButtonWnd);
- m_hButtonWnd = NULL;
+ m_hButtonWnd = nullptr;
- InvalidateRect(m_pCtrl->m_hTree, bValidRect ? &rToInvalidate : NULL, TRUE);
+ InvalidateRect(m_pCtrl->m_hTree, bValidRect ? &rToInvalidate : nullptr, TRUE);
}
}
diff --git a/plugins/HistoryStats/src/optionsctrlimpl_color.cpp b/plugins/HistoryStats/src/optionsctrlimpl_color.cpp
index 3439d87832..b7ff993eed 100644
--- a/plugins/HistoryStats/src/optionsctrlimpl_color.cpp
+++ b/plugins/HistoryStats/src/optionsctrlimpl_color.cpp
@@ -14,7 +14,7 @@ COLORREF OptionsCtrlImpl::Color::getColorValue()
OptionsCtrlImpl::Color::Color(OptionsCtrlImpl* pCtrl, Item* pParent, const wchar_t* szLabel, COLORREF crColor, DWORD dwFlags, INT_PTR dwData)
: Item(pCtrl, itColor, szLabel, dwFlags, dwData)
- , m_hColorWnd(NULL)
+ , m_hColorWnd(nullptr)
, m_crColor(crColor)
{
m_pCtrl->insertItem(pParent, this, m_strLabel.c_str(), dwFlags, m_bEnabled ? siColor : siColorG);
@@ -54,9 +54,9 @@ void OptionsCtrlImpl::Color::onSelect()
DWORD dwStyle = WS_CHILD | WS_VISIBLE | WS_TABSTOP;
if (hTempWnd = CreateWindowEx(
- 0, _A2W(WNDCLASS_COLOURPICKER), NULL, dwStyle,
+ 0, _A2W(WNDCLASS_COLOURPICKER), nullptr, dwStyle,
r.left, r.top, r.right - r.left, r.bottom - r.top,
- m_pCtrl->m_hTree, reinterpret_cast<HMENU>(ccColor), g_hInst, NULL))
+ m_pCtrl->m_hTree, reinterpret_cast<HMENU>(ccColor), g_hInst, nullptr))
{
SendMessage(hTempWnd, CPM_SETCOLOUR, 0, m_crColor);
@@ -83,9 +83,9 @@ void OptionsCtrlImpl::Color::onDeselect()
m_pCtrl->setNodeText(m_hItem, m_strLabel.c_str());
DestroyWindow(m_hColorWnd);
- m_hColorWnd = NULL;
+ m_hColorWnd = nullptr;
- InvalidateRect(m_pCtrl->m_hTree, bValidRect ? &rToInvalidate : NULL, TRUE);
+ InvalidateRect(m_pCtrl->m_hTree, bValidRect ? &rToInvalidate : nullptr, TRUE);
}
}
diff --git a/plugins/HistoryStats/src/optionsctrlimpl_combo.cpp b/plugins/HistoryStats/src/optionsctrlimpl_combo.cpp
index db0837a97e..5e8aa5bad6 100644
--- a/plugins/HistoryStats/src/optionsctrlimpl_combo.cpp
+++ b/plugins/HistoryStats/src/optionsctrlimpl_combo.cpp
@@ -47,7 +47,7 @@ ext::string OptionsCtrlImpl::Combo::getCombinedText()
}
OptionsCtrlImpl::Combo::Combo(OptionsCtrlImpl* pCtrl, Item* pParent, const wchar_t* szLabel, DWORD dwFlags, INT_PTR dwData)
- : Item(pCtrl, itCombo, szLabel, dwFlags, dwData), m_hComboWnd(NULL), m_nSelected(-1)
+ : Item(pCtrl, itCombo, szLabel, dwFlags, dwData), m_hComboWnd(nullptr), m_nSelected(-1)
{
m_bDisableChildsOnIndex0 = bool_(dwFlags & OCF_DISABLECHILDSONINDEX0);
@@ -88,7 +88,7 @@ void OptionsCtrlImpl::Combo::onSelect()
if (hTempWnd = CreateWindowEx(
WS_EX_CLIENTEDGE, WC_COMBOBOX, L"", dwStyle,
r.left, r.top, r.right - r.left, (r.bottom - r.top) * 20,
- m_pCtrl->m_hTree, reinterpret_cast<HMENU>(ccCombo), g_hInst, NULL))
+ m_pCtrl->m_hTree, reinterpret_cast<HMENU>(ccCombo), g_hInst, nullptr))
{
vector_each_(i, m_Items)
{
@@ -127,9 +127,9 @@ void OptionsCtrlImpl::Combo::onDeselect()
m_pCtrl->setNodeText(m_hItem, getCombinedText().c_str());
DestroyWindow(m_hComboWnd);
- m_hComboWnd = NULL;
+ m_hComboWnd = nullptr;
- InvalidateRect(m_pCtrl->m_hTree, bValidRect ? &rToInvalidate : NULL, TRUE);
+ InvalidateRect(m_pCtrl->m_hTree, bValidRect ? &rToInvalidate : nullptr, TRUE);
// enable childs?
enableChildsCombo();
diff --git a/plugins/HistoryStats/src/optionsctrlimpl_datetime.cpp b/plugins/HistoryStats/src/optionsctrlimpl_datetime.cpp
index 0a32c7a29c..9a089fc886 100644
--- a/plugins/HistoryStats/src/optionsctrlimpl_datetime.cpp
+++ b/plugins/HistoryStats/src/optionsctrlimpl_datetime.cpp
@@ -181,7 +181,7 @@ ext::string OptionsCtrlImpl::DateTime::getCombinedText()
}
OptionsCtrlImpl::DateTime::DateTime(OptionsCtrlImpl* pCtrl, Item* pParent, const wchar_t* szLabel, const wchar_t* szFormat, time_t timestamp, DWORD dwFlags, INT_PTR dwData)
-: Item(pCtrl, itDateTime, szLabel, dwFlags, dwData), m_hDateTimeWnd(NULL), m_strFormat(szFormat), m_timestamp(timestamp)
+: Item(pCtrl, itDateTime, szLabel, dwFlags, dwData), m_hDateTimeWnd(nullptr), m_strFormat(szFormat), m_timestamp(timestamp)
{
m_bDisableChildsOnNone = bool_(dwFlags & OCF_DISABLECHILDSONNONE);
m_bAllowNone = bool_(dwFlags & OCF_ALLOWNONE);
@@ -221,7 +221,7 @@ void OptionsCtrlImpl::DateTime::onSelect()
if (hTempWnd = CreateWindowEx(
WS_EX_CLIENTEDGE, DATETIMEPICK_CLASS, L"", dwStyle,
r.left, r.top, r.right - r.left, r.bottom - r.top,
- m_pCtrl->m_hTree, reinterpret_cast<HMENU>(ccDateTime), g_hInst, NULL)) {
+ m_pCtrl->m_hTree, reinterpret_cast<HMENU>(ccDateTime), g_hInst, nullptr)) {
// restrict to dates a timestamp can hold (with 1 day less to avoid timezone issues)
SYSTEMTIME stMinMax[2] = { toSystemTime(0x00000000 + 24 * 60 * 60), toSystemTime(0x7FFFFFFF - 24 * 60 * 60) };
@@ -266,9 +266,9 @@ void OptionsCtrlImpl::DateTime::onDeselect()
m_pCtrl->setNodeText(m_hItem, getCombinedText().c_str());
DestroyWindow(m_hDateTimeWnd);
- m_hDateTimeWnd = NULL;
+ m_hDateTimeWnd = nullptr;
- InvalidateRect(m_pCtrl->m_hTree, bValidRect ? &rToInvalidate : NULL, TRUE);
+ InvalidateRect(m_pCtrl->m_hTree, bValidRect ? &rToInvalidate : nullptr, TRUE);
// enable childs?
enableChildsDateTime();
diff --git a/plugins/HistoryStats/src/optionsctrlimpl_edit.cpp b/plugins/HistoryStats/src/optionsctrlimpl_edit.cpp
index c297fedd16..df4991990b 100644
--- a/plugins/HistoryStats/src/optionsctrlimpl_edit.cpp
+++ b/plugins/HistoryStats/src/optionsctrlimpl_edit.cpp
@@ -39,7 +39,7 @@ ext::string OptionsCtrlImpl::Edit::getCombinedText()
}
OptionsCtrlImpl::Edit::Edit(OptionsCtrlImpl* pCtrl, Item* pParent, const wchar_t* szLabel, const wchar_t* szEdit, DWORD dwFlags, INT_PTR dwData)
- : Item(pCtrl, itEdit, szLabel, dwFlags, dwData), m_hEditWnd(NULL)
+ : Item(pCtrl, itEdit, szLabel, dwFlags, dwData), m_hEditWnd(nullptr)
{
m_strEdit = szEdit;
m_bNumber = bool_(dwFlags & OCF_NUMBER);
@@ -85,7 +85,7 @@ void OptionsCtrlImpl::Edit::onSelect()
if (hTempWnd = CreateWindowEx(
WS_EX_CLIENTEDGE, WC_EDIT, m_strEdit.c_str(), dwStyle,
r.left, r.top, r.right - r.left, r.bottom - r.top,
- m_pCtrl->m_hTree, reinterpret_cast<HMENU>(ccEdit), g_hInst, NULL))
+ m_pCtrl->m_hTree, reinterpret_cast<HMENU>(ccEdit), g_hInst, nullptr))
{
SendMessage(hTempWnd, WM_SETFONT, reinterpret_cast<WPARAM>(hTreeFront), MAKELPARAM(TRUE, 0));
@@ -114,9 +114,9 @@ void OptionsCtrlImpl::Edit::onDeselect()
m_pCtrl->setNodeText(m_hItem, getCombinedText().c_str());
DestroyWindow(m_hEditWnd);
- m_hEditWnd = NULL;
+ m_hEditWnd = nullptr;
- InvalidateRect(m_pCtrl->m_hTree, bValidRect ? &rToInvalidate : NULL, TRUE);
+ InvalidateRect(m_pCtrl->m_hTree, bValidRect ? &rToInvalidate : nullptr, TRUE);
}
}
diff --git a/plugins/HistoryStats/src/optionsctrlimpl_item.cpp b/plugins/HistoryStats/src/optionsctrlimpl_item.cpp
index 2900ce6a44..faf8ec18e0 100644
--- a/plugins/HistoryStats/src/optionsctrlimpl_item.cpp
+++ b/plugins/HistoryStats/src/optionsctrlimpl_item.cpp
@@ -6,7 +6,7 @@
*/
OptionsCtrlImpl::Item::Item(OptionsCtrlImpl* pCtrl, ItemType ItemType, const wchar_t* szLabel, DWORD dwFlags, INT_PTR dwData) :
- m_pCtrl(pCtrl), m_hItem(NULL), m_nRef(1), m_ItemType(ItemType), m_strLabel(szLabel), m_dwData(dwData)
+ m_pCtrl(pCtrl), m_hItem(nullptr), m_nRef(1), m_ItemType(ItemType), m_strLabel(szLabel), m_dwData(dwData)
{
m_bEnabled = !(dwFlags & OCF_DISABLED);
m_bDisableChilds = !(dwFlags & OCF_NODISABLECHILDS);
diff --git a/plugins/HistoryStats/src/settings.cpp b/plugins/HistoryStats/src/settings.cpp
index 9ed6692ff7..722e6e0c96 100644
--- a/plugins/HistoryStats/src/settings.cpp
+++ b/plugins/HistoryStats/src/settings.cpp
@@ -41,7 +41,7 @@ Settings::CharMapper::CharMapper(const Settings& settings)
Settings::Filter::Filter(const ext::string& strID)
: m_strID(strID), m_nMode(fwmWordsMatching), m_nRef(0)
{
- time_t curTime = time(NULL);
+ time_t curTime = time(nullptr);
struct tm* curTM = localtime(&curTime);
m_strName += utils::intToPadded(1900 + curTM->tm_year, 4);
@@ -393,7 +393,7 @@ const Settings::Filter* Settings::getFilter(const ext::string& strID) const
return &(*i);
}
- return NULL;
+ return nullptr;
}
Settings& Settings::operator =(const Settings& other)
@@ -569,7 +569,7 @@ void Settings::ensureConstraints()
void Settings::openURL(const wchar_t *szURL)
{
if (m_PathToBrowser.empty())
- ShellExecute(NULL, L"open", szURL, NULL, NULL, SW_SHOWNORMAL);
+ ShellExecute(nullptr, L"open", szURL, nullptr, nullptr, SW_SHOWNORMAL);
else
- ShellExecute(NULL, L"open", m_PathToBrowser.c_str(), szURL, NULL, SW_SHOWNORMAL);
+ ShellExecute(nullptr, L"open", m_PathToBrowser.c_str(), szURL, nullptr, SW_SHOWNORMAL);
}
diff --git a/plugins/HistoryStats/src/settingstree.cpp b/plugins/HistoryStats/src/settingstree.cpp
index 21d6501cf8..ff3893777c 100644
--- a/plugins/HistoryStats/src/settingstree.cpp
+++ b/plugins/HistoryStats/src/settingstree.cpp
@@ -10,12 +10,12 @@ void SettingsTree::makeKeyValid()
}
SettingsTree::SettingsTree() :
- m_pCurValues(NULL)
+ m_pCurValues(nullptr)
{
}
SettingsTree::SettingsTree(const ext::string& config) :
- m_pCurValues(NULL)
+ m_pCurValues(nullptr)
{
fromString(config);
}
@@ -122,7 +122,7 @@ void SettingsTree::setKey(const wchar_t* key)
if (i != m_Keys.end())
m_pCurValues = &i->second;
else
- m_pCurValues = NULL;
+ m_pCurValues = nullptr;
}
bool SettingsTree::readBool(const wchar_t* setting, bool errorValue) const
@@ -213,7 +213,7 @@ bool SettingsTree::delSetting(const wchar_t* setting)
if (m_pCurValues->size() == 0) {
m_Keys.erase(m_CurKey);
- m_pCurValues = NULL;
+ m_pCurValues = nullptr;
}
return true;
diff --git a/plugins/HistoryStats/src/statistic.cpp b/plugins/HistoryStats/src/statistic.cpp
index 50cd82c8ad..842e24106e 100644
--- a/plugins/HistoryStats/src/statistic.cpp
+++ b/plugins/HistoryStats/src/statistic.cpp
@@ -31,7 +31,7 @@ void Statistic::prepareColumns()
{
Column *pCol = m_Settings.getCol(i);
if (pCol->isEnabled()) {
- int restrictions = pCol->configGetRestrictions(NULL);
+ int restrictions = pCol->configGetRestrictions(nullptr);
// MEMO: checks for columns having no HTML-only support
if (!bOutputPNG && !(restrictions & Column::crHTMLMask))
@@ -541,7 +541,7 @@ bool Statistic::stepSortContacts()
ContactCompareBase** ppCmps = new ContactCompareBase*[cmpDepth];
- ContactCompareBase* pCmp = NULL;
+ ContactCompareBase* pCmp = nullptr;
ContactCompareBase* pPrev = &cmpName;
for (int i = cmpDepth - 1; i >= 0; --i) {
@@ -658,7 +658,7 @@ bool Statistic::stepSortContacts()
pCmp->setDir(m_Settings.m_Sort[i].asc);
ppCmps[i] = pPrev = pCmp;
- pCmp = NULL;
+ pCmp = nullptr;
}
std::sort(m_Contacts.begin(), m_Contacts.end(), ContactCompareOp(ppCmps[0]));
@@ -707,25 +707,25 @@ bool Statistic::stepOmitContacts()
double (Contact::*double_fn)() const;
DWORD(Contact::*DWORD_fn)() const;
} valueMap[] = {
- { 0, 1.0, &Contact::getInBytes, 0, 0 },
- { 0, 1.0, &Contact::getOutBytes, 0, 0 },
- { 0, 1.0, &Contact::getTotalBytes, 0, 0 },
- { 1, 604800.0, 0, &Contact::getInBytesAvg, 0 },
- { 1, 604800.0, 0, &Contact::getOutBytesAvg, 0 },
- { 1, 604800.0, 0, &Contact::getTotalBytesAvg, 0 },
- { 0, 1.0, &Contact::getInMessages, 0, 0 },
- { 0, 1.0, &Contact::getOutMessages, 0, 0 },
- { 0, 1.0, &Contact::getTotalMessages, 0, 0 },
- { 1, 604800.0, 0, &Contact::getInMessagesAvg, 0 },
- { 1, 604800.0, 0, &Contact::getOutMessagesAvg, 0 },
- { 1, 604800.0, 0, &Contact::getTotalMessagesAvg, 0 },
- { 0, 1.0, &Contact::getInChats, 0, 0 },
- { 0, 1.0, &Contact::getOutChats, 0, 0 },
- { 0, 1.0, &Contact::getTotalChats, 0, 0 },
- { 1, 604800.0, 0, &Contact::getInChatsAvg, 0 },
- { 1, 604800.0, 0, &Contact::getOutChatsAvg, 0 },
- { 1, 604800.0, 0, &Contact::getTotalChatsAvg, 0 },
- { 2, 1 / 3600.0, 0, 0, &Contact::getChatDurSum },
+ { 0, 1.0, &Contact::getInBytes, nullptr, nullptr },
+ { 0, 1.0, &Contact::getOutBytes, nullptr, nullptr },
+ { 0, 1.0, &Contact::getTotalBytes, nullptr, nullptr },
+ { 1, 604800.0, nullptr, &Contact::getInBytesAvg, nullptr },
+ { 1, 604800.0, nullptr, &Contact::getOutBytesAvg, nullptr },
+ { 1, 604800.0, nullptr, &Contact::getTotalBytesAvg, nullptr },
+ { 0, 1.0, &Contact::getInMessages, nullptr, nullptr },
+ { 0, 1.0, &Contact::getOutMessages, nullptr, nullptr },
+ { 0, 1.0, &Contact::getTotalMessages, nullptr, nullptr },
+ { 1, 604800.0, nullptr, &Contact::getInMessagesAvg, nullptr },
+ { 1, 604800.0, nullptr, &Contact::getOutMessagesAvg, nullptr },
+ { 1, 604800.0, nullptr, &Contact::getTotalMessagesAvg, nullptr },
+ { 0, 1.0, &Contact::getInChats, nullptr, nullptr },
+ { 0, 1.0, &Contact::getOutChats, nullptr, nullptr },
+ { 0, 1.0, &Contact::getTotalChats, nullptr, nullptr },
+ { 1, 604800.0, nullptr, &Contact::getInChatsAvg, nullptr },
+ { 1, 604800.0, nullptr, &Contact::getOutChatsAvg, nullptr },
+ { 1, 604800.0, nullptr, &Contact::getTotalChatsAvg, nullptr },
+ { 2, 1 / 3600.0, nullptr, nullptr, &Contact::getChatDurSum },
};
int valueKey = m_Settings.m_OmitByValueData;
@@ -1173,12 +1173,12 @@ Statistic::Statistic(const Settings& settings, InvocationSource invokedFrom, HIN
m_Settings(settings),
m_CharMapper(m_Settings),
m_hInst(hInst),
- m_hWndProgress(NULL),
- m_hThreadPushEvent(NULL),
- m_hCancelEvent(NULL),
+ m_hWndProgress(nullptr),
+ m_hThreadPushEvent(nullptr),
+ m_hCancelEvent(nullptr),
m_InvokedFrom(invokedFrom),
- m_pTotals(NULL),
- m_pOmitted(NULL),
+ m_pTotals(nullptr),
+ m_pOmitted(nullptr),
m_bActuallyOmitted(false),
m_nNextSlot(0),
m_nLastFileNr(0),
@@ -1188,7 +1188,7 @@ Statistic::Statistic(const Settings& settings, InvocationSource invokedFrom, HIN
m_nFirstTime(0),
m_nLastTime(0)
{
- m_TimeStarted = TimeZone_ToLocal(time(NULL));
+ m_TimeStarted = TimeZone_ToLocal(time(nullptr));
m_MSecStarted = GetTickCount();
m_AverageMinTime = settings.m_AverageMinTime * 24 * 60 * 60; // calculate seconds from days
}
@@ -1196,15 +1196,15 @@ Statistic::Statistic(const Settings& settings, InvocationSource invokedFrom, HIN
bool Statistic::createStatistics()
{
// Prepare event for cancel.
- m_hCancelEvent = CreateEvent(NULL, FALSE, FALSE, NULL);
- if (m_hCancelEvent == NULL)
+ m_hCancelEvent = CreateEvent(nullptr, FALSE, FALSE, nullptr);
+ if (m_hCancelEvent == nullptr)
return false;
- m_hWndProgress = CreateDialog(m_hInst, MAKEINTRESOURCE(IDD_PROGRESS), 0, staticProgressProc);
+ m_hWndProgress = CreateDialog(m_hInst, MAKEINTRESOURCE(IDD_PROGRESS), nullptr, staticProgressProc);
- if (m_hWndProgress == NULL) {
+ if (m_hWndProgress == nullptr) {
CloseHandle(m_hCancelEvent);
- m_hCancelEvent = NULL;
+ m_hCancelEvent = nullptr;
return false;
}
@@ -1220,13 +1220,13 @@ bool Statistic::createStatistics()
MSG msg;
while (!bDone) {
- while (PeekMessage(&msg, 0, 0, 0, PM_REMOVE)) {
+ while (PeekMessage(&msg, nullptr, 0, 0, PM_REMOVE)) {
if (msg.message == WM_QUIT) {
bDone = true;
break;
}
- if (msg.hwnd == NULL || !IsDialogMessage(msg.hwnd, &msg)) { /* Wine fix. */
+ if (msg.hwnd == nullptr || !IsDialogMessage(msg.hwnd, &msg)) { /* Wine fix. */
TranslateMessage(&msg);
DispatchMessage(&msg);
}
@@ -1246,8 +1246,8 @@ bool Statistic::createStatistics()
// Cleanup.
CloseHandle(m_hCancelEvent);
- m_hCancelEvent = NULL;
- m_hWndProgress = NULL;
+ m_hCancelEvent = nullptr;
+ m_hWndProgress = nullptr;
if (m_bResult) {
// Save last successfully created statistics
@@ -1316,7 +1316,7 @@ void __cdecl Statistic::threadProc(void *lpParameter)
// check for errors
if (!pStats->m_ErrorText.empty() && !Miranda_IsTerminated())
- MessageBox(0, pStats->m_ErrorText.c_str(), TranslateT("HistoryStats - Error"), MB_ICONERROR | MB_OK);
+ MessageBox(nullptr, pStats->m_ErrorText.c_str(), TranslateT("HistoryStats - Error"), MB_ICONERROR | MB_OK);
// free statistics
delete pStats;
@@ -1402,7 +1402,7 @@ void Statistic::run(const Settings& settings, InvocationSource invokedFrom, HINS
{
// check if running and make running
if (m_bRunning) {
- MessageBox(0,
+ MessageBox(nullptr,
TranslateT("HistoryStats is already generating statistics. Please wait for the already running process to be finished or cancel it and try again."),
TranslateT("HistoryStats"), MB_ICONINFORMATION | MB_OK);
return;
@@ -1410,9 +1410,9 @@ void Statistic::run(const Settings& settings, InvocationSource invokedFrom, HINS
m_bRunning = true;
- HANDLE hEvent = CreateEvent(NULL, FALSE, FALSE, NULL);
+ HANDLE hEvent = CreateEvent(nullptr, FALSE, FALSE, nullptr);
// create event for thread stack unwinding
- if (hEvent == NULL) {
+ if (hEvent == nullptr) {
m_bRunning = false;
return;
}
@@ -1424,11 +1424,11 @@ void Statistic::run(const Settings& settings, InvocationSource invokedFrom, HINS
HANDLE hThread = mir_forkthread(threadProc, (void*)pStats);
// wait for thread to place itself on thread unwind stack
- if (hThread != NULL)
+ if (hThread != nullptr)
WaitForSingleObject(pStats->m_hThreadPushEvent, INFINITE);
else
m_bRunning = false;
CloseHandle(pStats->m_hThreadPushEvent);
- pStats->m_hThreadPushEvent = NULL;
+ pStats->m_hThreadPushEvent = nullptr;
}
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,