summaryrefslogtreecommitdiff
path: root/plugins/SmileyAdd/src/AniSmileyObject.cpp
diff options
context:
space:
mode:
authorGoraf <22941576+Goraf@users.noreply.github.com>2017-11-13 15:03:31 +0100
committerGoraf <22941576+Goraf@users.noreply.github.com>2017-11-13 15:07:33 +0100
commita7c24ca48995cf2bf436156302f96b91bf135409 (patch)
tree953835509ff1b778833e78fd7b74b05e05e77c84 /plugins/SmileyAdd/src/AniSmileyObject.cpp
parent591ec17b1c99db7f120c22ca9fb20ae05fe78325 (diff)
Code modernize ...
* replace 0/NULL with nullptr [using clang-tidy]
Diffstat (limited to 'plugins/SmileyAdd/src/AniSmileyObject.cpp')
-rw-r--r--plugins/SmileyAdd/src/AniSmileyObject.cpp20
1 files changed, 10 insertions, 10 deletions
diff --git a/plugins/SmileyAdd/src/AniSmileyObject.cpp b/plugins/SmileyAdd/src/AniSmileyObject.cpp
index c0c41f39c6..78bf8dba2b 100644
--- a/plugins/SmileyAdd/src/AniSmileyObject.cpp
+++ b/plugins/SmileyAdd/src/AniSmileyObject.cpp
@@ -60,7 +60,7 @@ public:
void LoadSmiley()
{
- if (m_img != NULL) return;
+ if (m_img != nullptr) return;
m_img = m_sml->CreateCachedImage();
if (m_img && m_img->IsAnimated() && opt.AnimateDlg) {
@@ -76,15 +76,15 @@ public:
m_bRegistered = false;
}
- if (m_img != NULL) {
+ if (m_img != nullptr) {
m_img->Release();
- m_img = NULL;
+ m_img = nullptr;
}
}
void GetDrawingProp()
{
- if (m_hwnd == NULL)
+ if (m_hwnd == nullptr)
return;
REOBJECT reObj = { 0 };
@@ -173,7 +173,7 @@ public:
DoDirectDraw(hdc);
- SelectClipRgn(hdc, res < 1 ? NULL : hrgnOld);
+ SelectClipRgn(hdc, res < 1 ? nullptr : hrgnOld);
DeleteObject(hrgnOld);
}
else {
@@ -186,7 +186,7 @@ public:
void DrawOnHPP()
{
- FVCNDATA_NMHDR nmh = { 0 };
+ FVCNDATA_NMHDR nmh = {};
nmh.code = NM_FIREVIEWCHANGE;
nmh.hwndFrom = m_hwnd;
@@ -263,7 +263,7 @@ public:
if (m_visible) LoadSmiley();
else UnloadSmiley();
- if (lpRect == NULL) return;
+ if (lpRect == nullptr) return;
if (m_animtype == animStdOle) {
m_animtype = animDrctRichEd;
GetDrawingProp();
@@ -296,11 +296,11 @@ public:
STDMETHOD(Draw)(DWORD dwAspect, LONG, void*, DVTARGETDEVICE*, HDC, HDC hdc, LPCRECTL pRectBounds, LPCRECTL, BOOL(__stdcall *)(ULONG_PTR), ULONG_PTR)
{
if (dwAspect != DVASPECT_CONTENT) return DV_E_DVASPECT;
- if (pRectBounds == NULL) return E_INVALIDARG;
+ if (pRectBounds == nullptr) return E_INVALIDARG;
LoadSmiley();
- if (m_img == NULL) return E_FAIL;
+ if (m_img == nullptr) return E_FAIL;
m_sizeExtent.cx = pRectBounds->right - pRectBounds->left;
m_sizeExtent.cy = pRectBounds->bottom - pRectBounds->top;
@@ -358,7 +358,7 @@ public:
ISmileyBase* CreateAniSmileyObject(SmileyType *sml, COLORREF clr, bool ishpp)
{
if (!sml->IsValid())
- return NULL;
+ return nullptr;
return new CAniSmileyObject(sml, clr, ishpp);
}