From 1565cafb836a8efdb7c39c9c1df1ca4d671f3d90 Mon Sep 17 00:00:00 2001 From: Alexander Karatarakis Date: Thu, 5 Jan 2017 14:09:48 -0800 Subject: Use nullptr --- toolsrc/src/metrics.cpp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'toolsrc/src') diff --git a/toolsrc/src/metrics.cpp b/toolsrc/src/metrics.cpp index 51c7179c8..1806dad87 100644 --- a/toolsrc/src/metrics.cpp +++ b/toolsrc/src/metrics.cpp @@ -237,13 +237,13 @@ true std::wstring GetSQMUser() { - LONG err = NULL; + LONG err; struct RAII_HKEY { - HKEY hkey = NULL; + HKEY hkey = nullptr; ~RAII_HKEY() { - if (hkey != NULL) + if (hkey != nullptr) RegCloseKey(hkey); } } HKCU_SQMClient; @@ -257,7 +257,7 @@ true std::array buffer; DWORD lType = 0; DWORD dwBufferSize = static_cast(buffer.size() * sizeof(wchar_t)); - err = RegQueryValueExW(HKCU_SQMClient.hkey, L"UserId", NULL, &lType, reinterpret_cast(buffer.data()), &dwBufferSize); + err = RegQueryValueExW(HKCU_SQMClient.hkey, L"UserId", nullptr, &lType, reinterpret_cast(buffer.data()), &dwBufferSize); if (err == ERROR_SUCCESS && lType == REG_SZ && dwBufferSize >= sizeof(wchar_t)) { size_t sz = dwBufferSize / sizeof(wchar_t); -- cgit v1.2.3