summaryrefslogtreecommitdiff
path: root/plugins/TipperYM/src/skin_parser.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/TipperYM/src/skin_parser.cpp
parent591ec17b1c99db7f120c22ca9fb20ae05fe78325 (diff)
Code modernize ...
* replace 0/NULL with nullptr [using clang-tidy]
Diffstat (limited to 'plugins/TipperYM/src/skin_parser.cpp')
-rw-r--r--plugins/TipperYM/src/skin_parser.cpp10
1 files changed, 5 insertions, 5 deletions
diff --git a/plugins/TipperYM/src/skin_parser.cpp b/plugins/TipperYM/src/skin_parser.cpp
index 8aa9c4869c..403ae81ac7 100644
--- a/plugins/TipperYM/src/skin_parser.cpp
+++ b/plugins/TipperYM/src/skin_parser.cpp
@@ -58,7 +58,7 @@ int RefreshSkinList(HWND hwndDlg)
bool FileExists(wchar_t *filename)
{
- HANDLE hFile = CreateFile(filename, 0, 0, 0, OPEN_EXISTING, 0, 0);
+ HANDLE hFile = CreateFile(filename, 0, 0, nullptr, OPEN_EXISTING, 0, nullptr);
if (hFile != INVALID_HANDLE_VALUE)
{
CloseHandle(hFile);
@@ -103,7 +103,7 @@ void ParseAboutPart(FILE *fp, wchar_t *buff, wchar_t *szSkinName)
void ParseImagePart(FILE *fp, wchar_t *buff, int iPart)
{
- opt.szImgFile[iPart] = NULL;
+ opt.szImgFile[iPart] = nullptr;
opt.transfMode[iPart] = TM_NONE;
opt.margins[iPart].left = 0;
opt.margins[iPart].top = 0;
@@ -182,7 +182,7 @@ char *GetSettingName(wchar_t *szValue, char *szPostfix, char *buff, size_t buffs
else if (wcsstr(szValue, L"divider"))
mir_snprintf(buff, buffsize, "Divider%s", szPostfix);
- return buff[0] ? buff : NULL;
+ return buff[0] ? buff : nullptr;
}
void ParseFontPart(FILE *fp, wchar_t *buff)
@@ -235,10 +235,10 @@ void ParseFontPart(FILE *fp, wchar_t *buff)
{
if (GetSettingName(buff, "Size", szSetting, sizeof(szSetting) - 1))
{
- HDC hdc = GetDC(0);
+ HDC hdc = GetDC(nullptr);
int size = -MulDiv(_wtoi(pch), GetDeviceCaps(hdc, LOGPIXELSY), 72);
db_set_b(0, MODULE, szSetting, (BYTE)size);
- ReleaseDC(0, hdc);
+ ReleaseDC(nullptr, hdc);
}
}
else if (wcsstr(buff, L"effect"))