summaryrefslogtreecommitdiff
path: root/plugins/IEView/src/MUCCHTMLBuilder.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/IEView/src/MUCCHTMLBuilder.cpp
parent591ec17b1c99db7f120c22ca9fb20ae05fe78325 (diff)
Code modernize ...
* replace 0/NULL with nullptr [using clang-tidy]
Diffstat (limited to 'plugins/IEView/src/MUCCHTMLBuilder.cpp')
-rw-r--r--plugins/IEView/src/MUCCHTMLBuilder.cpp14
1 files changed, 7 insertions, 7 deletions
diff --git a/plugins/IEView/src/MUCCHTMLBuilder.cpp b/plugins/IEView/src/MUCCHTMLBuilder.cpp
index 9fd96db78d..38a3d64089 100644
--- a/plugins/IEView/src/MUCCHTMLBuilder.cpp
+++ b/plugins/IEView/src/MUCCHTMLBuilder.cpp
@@ -37,7 +37,7 @@ static const char *classNames[] = {
MUCCHTMLBuilder::MUCCHTMLBuilder()
{
setLastEventType(-1);
- setLastEventTime(time(NULL));
+ setLastEventTime(time(nullptr));
}
void MUCCHTMLBuilder::loadMsgDlgFont(int i, LOGFONTA * lf, COLORREF * colour)
@@ -86,7 +86,7 @@ char *MUCCHTMLBuilder::timestampToString(DWORD dwData, time_t check)
szResult[0] = '\0';
struct tm tm_now, tm_today;
- time_t now = time(NULL);
+ time_t now = time(nullptr);
time_t today;
tm_now = *localtime(&now);
tm_today = tm_now;
@@ -116,7 +116,7 @@ void MUCCHTMLBuilder::buildHead(IEView *view, IEVIEWEVENT *event)
LOGFONTA lf;
COLORREF color;
ProtocolSettings *protoSettings = getChatProtocolSettings(event->pszProto);
- if (protoSettings == NULL)
+ if (protoSettings == nullptr)
return;
if (protoSettings->getChatMode() == Options::MODE_TEMPLATE)
@@ -128,9 +128,9 @@ void MUCCHTMLBuilder::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, MUCCMOD, "BackgroundLog", 0xFFFFFF);
@@ -181,7 +181,7 @@ void MUCCHTMLBuilder::buildHead(IEView *view, IEVIEWEVENT *event)
void MUCCHTMLBuilder::appendEventNonTemplate(IEView *view, IEVIEWEVENT *event)
{
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++) {
DWORD dwData = eventData->dwData;
bool isSent = eventData->bIsMe != 0;
CMStringA str, style;
@@ -270,7 +270,7 @@ void MUCCHTMLBuilder::appendEventNonTemplate(IEView *view, IEVIEWEVENT *event)
void MUCCHTMLBuilder::appendEvent(IEView *view, IEVIEWEVENT *event)
{
ProtocolSettings *protoSettings = getChatProtocolSettings(event->pszProto);
- if (protoSettings != NULL)
+ if (protoSettings != nullptr)
appendEventNonTemplate(view, event);
}