aboutsummaryrefslogtreecommitdiff
path: root/toolsrc/src/metrics.cpp
diff options
context:
space:
mode:
authorAlexander Karatarakis <alkarata@microsoft.com>2017-01-05 14:09:48 -0800
committerAlexander Karatarakis <alkarata@microsoft.com>2017-01-05 14:09:48 -0800
commit1565cafb836a8efdb7c39c9c1df1ca4d671f3d90 (patch)
treee568649c11d1bf4ae00afa39f9780732b5a42cee /toolsrc/src/metrics.cpp
parent0b5e2e9e76e66b566cf4d3f68146fdbdff2bac05 (diff)
downloadvcpkg-1565cafb836a8efdb7c39c9c1df1ca4d671f3d90.tar.gz
vcpkg-1565cafb836a8efdb7c39c9c1df1ca4d671f3d90.zip
Use nullptr
Diffstat (limited to 'toolsrc/src/metrics.cpp')
-rw-r--r--toolsrc/src/metrics.cpp8
1 files changed, 4 insertions, 4 deletions
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<wchar_t,128> buffer;
DWORD lType = 0;
DWORD dwBufferSize = static_cast<DWORD>(buffer.size() * sizeof(wchar_t));
- err = RegQueryValueExW(HKCU_SQMClient.hkey, L"UserId", NULL, &lType, reinterpret_cast<LPBYTE>(buffer.data()), &dwBufferSize);
+ err = RegQueryValueExW(HKCU_SQMClient.hkey, L"UserId", nullptr, &lType, reinterpret_cast<LPBYTE>(buffer.data()), &dwBufferSize);
if (err == ERROR_SUCCESS && lType == REG_SZ && dwBufferSize >= sizeof(wchar_t))
{
size_t sz = dwBufferSize / sizeof(wchar_t);