summaryrefslogtreecommitdiffstats
path: root/Source/cmGlobalVisualStudioGenerator.cxx
diff options
context:
space:
mode:
authorscivision <scivision@users.noreply.github.com>2023-02-14 19:06:08 (GMT)
committerscivision <scivision@users.noreply.github.com>2023-02-14 19:34:03 (GMT)
commit7b0a629693bb3771eed9d922b8138ccc6e5ae0c2 (patch)
treecec26df2a6554f9a7031646931dfb1ec6f70912b /Source/cmGlobalVisualStudioGenerator.cxx
parent283432a1aaa72cd0dc5c0bd0e301bccfd52edd01 (diff)
downloadCMake-7b0a629693bb3771eed9d922b8138ccc6e5ae0c2.zip
CMake-7b0a629693bb3771eed9d922b8138ccc6e5ae0c2.tar.gz
CMake-7b0a629693bb3771eed9d922b8138ccc6e5ae0c2.tar.bz2
Source: use C++11 nullptr
Diffstat (limited to 'Source/cmGlobalVisualStudioGenerator.cxx')
-rw-r--r--Source/cmGlobalVisualStudioGenerator.cxx18
1 files changed, 9 insertions, 9 deletions
diff --git a/Source/cmGlobalVisualStudioGenerator.cxx b/Source/cmGlobalVisualStudioGenerator.cxx
index cd0fb18..702199d 100644
--- a/Source/cmGlobalVisualStudioGenerator.cxx
+++ b/Source/cmGlobalVisualStudioGenerator.cxx
@@ -544,12 +544,12 @@ bool IsVisualStudioMacrosFileRegistered(const std::string& macrosFile,
cmSystemTools::ConvertToUnixSlashes(s1);
std::string keyname;
- HKEY hkey = NULL;
+ HKEY hkey = nullptr;
LONG result = ERROR_SUCCESS;
DWORD index = 0;
keyname = regKeyBase + "\\OtherProjects7";
- hkey = NULL;
+ hkey = nullptr;
result =
RegOpenKeyExW(HKEY_CURRENT_USER, cmsys::Encoding::ToWide(keyname).c_str(),
0, KEY_READ, &hkey);
@@ -567,7 +567,7 @@ bool IsVisualStudioMacrosFileRegistered(const std::string& macrosFile,
RegEnumKeyExW(hkey, index, subkeyname, &cch_subkeyname, 0, keyclass,
&cch_keyclass, &lastWriteTime)) {
// Open the subkey and query the values of interest:
- HKEY hsubkey = NULL;
+ HKEY hsubkey = nullptr;
result = RegOpenKeyExW(hkey, subkeyname, 0, KEY_READ, &hsubkey);
if (ERROR_SUCCESS == result) {
DWORD valueType = REG_SZ;
@@ -641,7 +641,7 @@ bool IsVisualStudioMacrosFileRegistered(const std::string& macrosFile,
nextAvailableSubKeyName = std::to_string(index);
keyname = regKeyBase + "\\RecordingProject7";
- hkey = NULL;
+ hkey = nullptr;
result =
RegOpenKeyExW(HKEY_CURRENT_USER, cmsys::Encoding::ToWide(keyname).c_str(),
0, KEY_READ, &hkey);
@@ -687,13 +687,13 @@ void WriteVSMacrosFileRegistryEntry(const std::string& nextAvailableSubKeyName,
const std::string& regKeyBase)
{
std::string keyname = regKeyBase + "\\OtherProjects7";
- HKEY hkey = NULL;
+ HKEY hkey = nullptr;
LONG result =
RegOpenKeyExW(HKEY_CURRENT_USER, cmsys::Encoding::ToWide(keyname).c_str(),
0, KEY_READ | KEY_WRITE, &hkey);
if (ERROR_SUCCESS == result) {
// Create the subkey and set the values of interest:
- HKEY hsubkey = NULL;
+ HKEY hsubkey = nullptr;
wchar_t lpClass[] = L"";
result = RegCreateKeyExW(
hkey, cmsys::Encoding::ToWide(nextAvailableSubKeyName).c_str(), 0,
@@ -960,13 +960,13 @@ void cmGlobalVisualStudioGenerator::AddSymbolExportCommand(
static bool OpenSolution(std::string const& sln)
{
HRESULT comInitialized =
- CoInitializeEx(NULL, COINIT_APARTMENTTHREADED | COINIT_DISABLE_OLE1DDE);
+ CoInitializeEx(nullptr, COINIT_APARTMENTTHREADED | COINIT_DISABLE_OLE1DDE);
if (FAILED(comInitialized)) {
return false;
}
- HINSTANCE hi =
- ShellExecuteA(NULL, "open", sln.c_str(), NULL, NULL, SW_SHOWNORMAL);
+ HINSTANCE hi = ShellExecuteA(nullptr, "open", sln.c_str(), nullptr, nullptr,
+ SW_SHOWNORMAL);
CoUninitialize();