From a7c24ca48995cf2bf436156302f96b91bf135409 Mon Sep 17 00:00:00 2001 From: Goraf <22941576+Goraf@users.noreply.github.com> Date: Mon, 13 Nov 2017 15:03:31 +0100 Subject: Code modernize ... * replace 0/NULL with nullptr [using clang-tidy] --- plugins/TipperYM/src/skin_parser.cpp | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'plugins/TipperYM/src/skin_parser.cpp') 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")) -- cgit v1.2.3