diff options
author | Goraf <22941576+Goraf@users.noreply.github.com> | 2017-11-13 15:03:31 +0100 |
---|---|---|
committer | Goraf <22941576+Goraf@users.noreply.github.com> | 2017-11-13 15:07:33 +0100 |
commit | a7c24ca48995cf2bf436156302f96b91bf135409 (patch) | |
tree | 953835509ff1b778833e78fd7b74b05e05e77c84 /plugins/IEView/src/ChatHTMLBuilder.cpp | |
parent | 591ec17b1c99db7f120c22ca9fb20ae05fe78325 (diff) |
Code modernize ...
* replace 0/NULL with nullptr [using clang-tidy]
Diffstat (limited to 'plugins/IEView/src/ChatHTMLBuilder.cpp')
-rw-r--r-- | plugins/IEView/src/ChatHTMLBuilder.cpp | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/plugins/IEView/src/ChatHTMLBuilder.cpp b/plugins/IEView/src/ChatHTMLBuilder.cpp index 12c0308a3e..d3f5cf2847 100644 --- a/plugins/IEView/src/ChatHTMLBuilder.cpp +++ b/plugins/IEView/src/ChatHTMLBuilder.cpp @@ -41,7 +41,7 @@ static const char *classNames[] = { ChatHTMLBuilder::ChatHTMLBuilder()
{
setLastEventType(-1);
- setLastEventTime(time(NULL));
+ setLastEventTime(time(nullptr));
}
void ChatHTMLBuilder::loadMsgDlgFont(int i, LOGFONTA * lf, COLORREF * colour)
@@ -98,7 +98,7 @@ void ChatHTMLBuilder::buildHead(IEView *view, IEVIEWEVENT *event) COLORREF color;
ProtocolSettings *protoSettings = getChatProtocolSettings(event->pszProto);
- if (protoSettings == NULL)
+ if (protoSettings == nullptr)
return;
if (protoSettings->getChatMode() == Options::MODE_TEMPLATE)
@@ -110,9 +110,9 @@ void ChatHTMLBuilder::buildHead(IEView *view, IEVIEWEVENT *event) str.AppendFormat("<html><head><link rel=\"stylesheet\" href=\"%s\"/></head><body class=\"body\">\n", externalCSS);
}
else {
- HDC hdc = GetDC(NULL);
+ HDC hdc = GetDC(nullptr);
int logPixelSY = GetDeviceCaps(hdc, LOGPIXELSY);
- ReleaseDC(NULL, hdc);
+ ReleaseDC(nullptr, hdc);
str.Append("<html><head>");
str.Append("<style type=\"text/css\">\n");
COLORREF bkgColor = db_get_dw(NULL, CHATMOD, "BackgroundLog", 0xFFFFFF);
@@ -161,7 +161,7 @@ void ChatHTMLBuilder::appendEventNonTemplate(IEView *view, IEVIEWEVENT *event) {
DWORD iconFlags = db_get_dw(NULL, CHATMOD, CHAT_ICON_FLAGS, 0);
IEVIEWEVENTDATA* eventData = event->eventData;
- for (int eventIdx = 0; eventData != NULL && (eventIdx < event->count || event->count == -1); eventData = eventData->next, eventIdx++) {
+ for (int eventIdx = 0; eventData != nullptr && (eventIdx < event->count || event->count == -1); eventData = eventData->next, eventIdx++) {
const char *iconFile = "";
DWORD dwData = eventData->dwData;
bool isSent = eventData->bIsMe != 0;
@@ -256,7 +256,7 @@ void ChatHTMLBuilder::appendEventNonTemplate(IEView *view, IEVIEWEVENT *event) void ChatHTMLBuilder::appendEvent(IEView *view, IEVIEWEVENT *event)
{
ProtocolSettings *protoSettings = getChatProtocolSettings(event->pszProto);
- if (protoSettings != NULL)
+ if (protoSettings != nullptr)
appendEventNonTemplate(view, event);
}
|