diff options
-rw-r--r-- | Source/cmGlobalVisualStudio10Generator.h | 4 | ||||
-rw-r--r-- | Source/cmGlobalVisualStudio11Generator.cxx | 2 | ||||
-rw-r--r-- | Source/cmGlobalVisualStudio12Generator.cxx | 2 | ||||
-rw-r--r-- | Source/cmGlobalVisualStudio14Generator.cxx | 2 | ||||
-rw-r--r-- | Source/cmGlobalVisualStudioVersionedGenerator.cxx | 6 | ||||
-rw-r--r-- | Source/cmIDEOptions.cxx | 6 | ||||
-rw-r--r-- | Source/cmLocalVisualStudio7Generator.cxx | 14 | ||||
-rw-r--r-- | Source/cmLocalVisualStudioGenerator.h | 2 | ||||
-rw-r--r-- | Source/cmVSSetupHelper.cxx | 44 | ||||
-rw-r--r-- | Source/cmVSSetupHelper.h | 14 | ||||
-rw-r--r-- | Source/cmVisualStudio10TargetGenerator.cxx | 2 | ||||
-rw-r--r-- | Source/cmVisualStudioSlnData.cxx | 2 | ||||
-rw-r--r-- | Source/cmVisualStudioWCEPlatformParser.cxx | 2 | ||||
-rw-r--r-- | Source/cmVisualStudioWCEPlatformParser.h | 2 |
14 files changed, 52 insertions, 52 deletions
diff --git a/Source/cmGlobalVisualStudio10Generator.h b/Source/cmGlobalVisualStudio10Generator.h index 3f01a9c..63c21c5 100644 --- a/Source/cmGlobalVisualStudio10Generator.h +++ b/Source/cmGlobalVisualStudio10Generator.h @@ -243,8 +243,8 @@ private: { LongestSourcePath() = default; size_t Length = 0; - cmGeneratorTarget* Target = 0; - cmSourceFile const* SourceFile = 0; + cmGeneratorTarget* Target = nullptr; + cmSourceFile const* SourceFile = nullptr; std::string SourceRel; }; LongestSourcePath LongestSource; diff --git a/Source/cmGlobalVisualStudio11Generator.cxx b/Source/cmGlobalVisualStudio11Generator.cxx index 75e3df8..c5b4340 100644 --- a/Source/cmGlobalVisualStudio11Generator.cxx +++ b/Source/cmGlobalVisualStudio11Generator.cxx @@ -22,7 +22,7 @@ static const char* cmVS11GenName(const std::string& name, std::string& genName) { if (strncmp(name.c_str(), vs11generatorName, sizeof(vs11generatorName) - 6) != 0) { - return 0; + return nullptr; } const char* p = name.c_str() + sizeof(vs11generatorName) - 6; if (cmHasLiteralPrefix(p, " 2012")) { diff --git a/Source/cmGlobalVisualStudio12Generator.cxx b/Source/cmGlobalVisualStudio12Generator.cxx index 7e56a78..dbe3519 100644 --- a/Source/cmGlobalVisualStudio12Generator.cxx +++ b/Source/cmGlobalVisualStudio12Generator.cxx @@ -21,7 +21,7 @@ static const char* cmVS12GenName(const std::string& name, std::string& genName) { if (strncmp(name.c_str(), vs12generatorName, sizeof(vs12generatorName) - 6) != 0) { - return 0; + return nullptr; } const char* p = name.c_str() + sizeof(vs12generatorName) - 6; if (cmHasLiteralPrefix(p, " 2013")) { diff --git a/Source/cmGlobalVisualStudio14Generator.cxx b/Source/cmGlobalVisualStudio14Generator.cxx index 0e05083..5ed2c94 100644 --- a/Source/cmGlobalVisualStudio14Generator.cxx +++ b/Source/cmGlobalVisualStudio14Generator.cxx @@ -23,7 +23,7 @@ static const char* cmVS14GenName(const std::string& name, std::string& genName) { if (strncmp(name.c_str(), vs14generatorName, sizeof(vs14generatorName) - 6) != 0) { - return 0; + return nullptr; } const char* p = name.c_str() + sizeof(vs14generatorName) - 6; if (cmHasLiteralPrefix(p, " 2015")) { diff --git a/Source/cmGlobalVisualStudioVersionedGenerator.cxx b/Source/cmGlobalVisualStudioVersionedGenerator.cxx index ee24f05..6fd4dd6 100644 --- a/Source/cmGlobalVisualStudioVersionedGenerator.cxx +++ b/Source/cmGlobalVisualStudioVersionedGenerator.cxx @@ -211,7 +211,7 @@ static const char* cmVS15GenName(const std::string& name, std::string& genName) { if (strncmp(name.c_str(), vs15generatorName, sizeof(vs15generatorName) - 6) != 0) { - return 0; + return nullptr; } const char* p = name.c_str() + sizeof(vs15generatorName) - 6; if (cmHasLiteralPrefix(p, " 2017")) { @@ -306,7 +306,7 @@ static const char* cmVS16GenName(const std::string& name, std::string& genName) { if (strncmp(name.c_str(), vs16generatorName, sizeof(vs16generatorName) - 6) != 0) { - return 0; + return nullptr; } const char* p = name.c_str() + sizeof(vs16generatorName) - 6; if (cmHasLiteralPrefix(p, " 2019")) { @@ -320,7 +320,7 @@ static const char* cmVS17GenName(const std::string& name, std::string& genName) { if (strncmp(name.c_str(), vs17generatorName, sizeof(vs17generatorName) - 6) != 0) { - return 0; + return nullptr; } const char* p = name.c_str() + sizeof(vs17generatorName) - 6; if (cmHasLiteralPrefix(p, " 2022")) { diff --git a/Source/cmIDEOptions.cxx b/Source/cmIDEOptions.cxx index 31e3a0e..bb36db3 100644 --- a/Source/cmIDEOptions.cxx +++ b/Source/cmIDEOptions.cxx @@ -20,9 +20,9 @@ cmIDEOptions::cmIDEOptions() this->AllowDefine = true; this->DoingInclude = false; this->AllowSlash = false; - this->DoingFollowing = 0; + this->DoingFollowing = nullptr; for (int i = 0; i < FlagTableCount; ++i) { - this->FlagTable[i] = 0; + this->FlagTable[i] = nullptr; } } @@ -47,7 +47,7 @@ void cmIDEOptions::HandleFlag(std::string const& flag) // If the last option expected a following value, this is it. if (this->DoingFollowing) { this->FlagMapUpdate(this->DoingFollowing, flag); - this->DoingFollowing = 0; + this->DoingFollowing = nullptr; return; } diff --git a/Source/cmLocalVisualStudio7Generator.cxx b/Source/cmLocalVisualStudio7Generator.cxx index 192f1de..3d36b51 100644 --- a/Source/cmLocalVisualStudio7Generator.cxx +++ b/Source/cmLocalVisualStudio7Generator.cxx @@ -57,7 +57,7 @@ public: using ItemVector = cmComputeLinkInformation::ItemVector; void OutputLibraries(std::ostream& fout, ItemVector const& libs); void OutputObjects(std::ostream& fout, cmGeneratorTarget* t, - std::string const& config, const char* isep = 0); + std::string const& config, const char* isep = nullptr); private: cmLocalVisualStudio7Generator* LocalGenerator; @@ -633,7 +633,7 @@ void cmLocalVisualStudio7Generator::WriteConfiguration( // 1 == executable // 10 == utility const char* configType = "10"; - const char* projectType = 0; + const char* projectType = nullptr; bool targetBuilds = true; switch (target->GetType()) { @@ -842,7 +842,7 @@ void cmLocalVisualStudio7Generator::WriteConfiguration( } fout << "/>\n"; // end of <Tool Name=VCCLCompilerTool if (gg->IsMarmasmEnabled() && !this->FortranProject) { - Options marmasmOptions(this, Options::MarmasmCompiler, 0, 0); + Options marmasmOptions(this, Options::MarmasmCompiler, nullptr, nullptr); /* clang-format off */ fout << "\t\t\t<Tool\n" @@ -860,7 +860,7 @@ void cmLocalVisualStudio7Generator::WriteConfiguration( /* clang-format on */ } if (gg->IsMasmEnabled() && !this->FortranProject) { - Options masmOptions(this, Options::MasmCompiler, 0, 0); + Options masmOptions(this, Options::MasmCompiler, nullptr, nullptr); /* clang-format off */ fout << "\t\t\t<Tool\n" @@ -1993,7 +1993,7 @@ void cmLocalVisualStudio7Generator::WriteProjectStartFortran( /* clang-format on */ cmValue p = target->GetProperty("VS_KEYWORD"); const char* keyword = p ? p->c_str() : "Console Application"; - const char* projectType = 0; + const char* projectType = nullptr; switch (target->GetType()) { case cmStateEnums::OBJECT_LIBRARY: case cmStateEnums::STATIC_LIBRARY: @@ -2013,7 +2013,7 @@ void cmLocalVisualStudio7Generator::WriteProjectStartFortran( if (!keyword) { keyword = "Console Application"; } - projectType = 0; + projectType = nullptr; break; case cmStateEnums::UTILITY: case cmStateEnums::GLOBAL_TARGET: @@ -2234,7 +2234,7 @@ static bool cmLVS7G_IsFAT(const char* dir) volRoot[0] = dir[0]; char fsName[16]; if (GetVolumeInformationA(volRoot, 0, 0, 0, 0, 0, fsName, 16) && - strstr(fsName, "FAT") != 0) { + strstr(fsName, "FAT") != nullptr) { return true; } } diff --git a/Source/cmLocalVisualStudioGenerator.h b/Source/cmLocalVisualStudioGenerator.h index 87bfbae..8fed1bd 100644 --- a/Source/cmLocalVisualStudioGenerator.h +++ b/Source/cmLocalVisualStudioGenerator.h @@ -47,7 +47,7 @@ public: void ComputeObjectFilenames( std::map<cmSourceFile const*, std::string>& mapping, - cmGeneratorTarget const* = 0) override; + cmGeneratorTarget const* = nullptr) override; protected: virtual const char* ReportErrorLabel() const; diff --git a/Source/cmVSSetupHelper.cxx b/Source/cmVSSetupHelper.cxx index 068b5be..a3f0faf 100644 --- a/Source/cmVSSetupHelper.cxx +++ b/Source/cmVSSetupHelper.cxx @@ -87,11 +87,11 @@ std::string VSInstanceInfo::GetInstallLocation() const cmVSSetupAPIHelper::cmVSSetupAPIHelper(unsigned int version) : Version(version) - , setupConfig(NULL) - , setupConfig2(NULL) - , setupHelper(NULL) + , setupConfig(nullptr) + , setupConfig2(nullptr) + , setupHelper(nullptr) { - comInitialized = CoInitializeEx(NULL, 0); + comInitialized = CoInitializeEx(nullptr, 0); if (SUCCEEDED(comInitialized)) { Initialize(); } else { @@ -101,9 +101,9 @@ cmVSSetupAPIHelper::cmVSSetupAPIHelper(unsigned int version) cmVSSetupAPIHelper::~cmVSSetupAPIHelper() { - setupHelper = NULL; - setupConfig2 = NULL; - setupConfig = NULL; + setupHelper = nullptr; + setupConfig2 = nullptr; + setupConfig = nullptr; if (SUCCEEDED(comInitialized)) CoUninitialize(); } @@ -176,7 +176,7 @@ bool cmVSSetupAPIHelper::CheckInstalledComponent( bool cmVSSetupAPIHelper::GetVSInstanceInfo( SmartCOMPtr<ISetupInstance2> pInstance, VSInstanceInfo& vsInstanceInfo) { - if (pInstance == NULL) + if (pInstance == nullptr) return false; InstanceState state; @@ -219,7 +219,7 @@ bool cmVSSetupAPIHelper::GetVSInstanceInfo( LPSAFEARRAY lpsaPackages; if (FAILED(pInstance->GetPackages(&lpsaPackages)) || - lpsaPackages == NULL) { + lpsaPackages == nullptr) { return false; } @@ -228,10 +228,10 @@ bool cmVSSetupAPIHelper::GetVSInstanceInfo( IUnknown** ppData = (IUnknown**)lpsaPackages->pvData; for (int i = lower; i < upper; i++) { - SmartCOMPtr<ISetupPackageReference> package = NULL; + SmartCOMPtr<ISetupPackageReference> package = nullptr; if (FAILED(ppData[i]->QueryInterface(IID_ISetupPackageReference, (void**)&package)) || - package == NULL) + package == nullptr) continue; bool win10SDKInstalled = false; @@ -369,11 +369,11 @@ bool cmVSSetupAPIHelper::EnumerateVSInstancesWithVswhere( bool cmVSSetupAPIHelper::EnumerateVSInstancesWithCOM( std::vector<VSInstanceInfo>& VSInstances) { - if (initializationFailure || setupConfig == NULL || setupConfig2 == NULL || - setupHelper == NULL) + if (initializationFailure || setupConfig == nullptr || + setupConfig2 == nullptr || setupHelper == nullptr) return false; - SmartCOMPtr<IEnumSetupInstances> enumInstances = NULL; + SmartCOMPtr<IEnumSetupInstances> enumInstances = nullptr; if (FAILED( setupConfig2->EnumInstances((IEnumSetupInstances**)&enumInstances)) || !enumInstances) { @@ -381,18 +381,18 @@ bool cmVSSetupAPIHelper::EnumerateVSInstancesWithCOM( } SmartCOMPtr<ISetupInstance> instance; - while (SUCCEEDED(enumInstances->Next(1, &instance, NULL)) && instance) { - SmartCOMPtr<ISetupInstance2> instance2 = NULL; + while (SUCCEEDED(enumInstances->Next(1, &instance, nullptr)) && instance) { + SmartCOMPtr<ISetupInstance2> instance2 = nullptr; if (FAILED( instance->QueryInterface(IID_ISetupInstance2, (void**)&instance2)) || !instance2) { - instance = NULL; + instance = nullptr; continue; } VSInstanceInfo instanceInfo; bool isInstalled = GetVSInstanceInfo(instance2, instanceInfo); - instance = instance2 = NULL; + instance = instance2 = nullptr; if (isInstalled) VSInstances.push_back(instanceInfo); } @@ -596,24 +596,24 @@ bool cmVSSetupAPIHelper::Initialize() return false; } - if (FAILED(setupConfig.CoCreateInstance(CLSID_SetupConfiguration, NULL, + if (FAILED(setupConfig.CoCreateInstance(CLSID_SetupConfiguration, nullptr, IID_ISetupConfiguration, CLSCTX_INPROC_SERVER)) || - setupConfig == NULL) { + setupConfig == nullptr) { initializationFailure = true; return false; } if (FAILED(setupConfig.QueryInterface(IID_ISetupConfiguration2, (void**)&setupConfig2)) || - setupConfig2 == NULL) { + setupConfig2 == nullptr) { initializationFailure = true; return false; } if (FAILED( setupConfig.QueryInterface(IID_ISetupHelper, (void**)&setupHelper)) || - setupHelper == NULL) { + setupHelper == nullptr) { initializationFailure = true; return false; } diff --git a/Source/cmVSSetupHelper.h b/Source/cmVSSetupHelper.h index ebcb28e..ea94d37 100644 --- a/Source/cmVSSetupHelper.h +++ b/Source/cmVSSetupHelper.h @@ -21,13 +21,13 @@ public: SmartCOMPtr(T* p) { ptr = p; - if (ptr != NULL) + if (ptr != nullptr) ptr->AddRef(); } SmartCOMPtr(const SmartCOMPtr<T>& sptr) { ptr = sptr.ptr; - if (ptr != NULL) + if (ptr != nullptr) ptr->AddRef(); } T** operator&() { return &ptr; } @@ -36,7 +36,7 @@ public: { if (*this != p) { ptr = p; - if (ptr != NULL) + if (ptr != nullptr) ptr->AddRef(); } return *this; @@ -45,7 +45,7 @@ public: template <class I> HRESULT QueryInterface(REFCLSID rclsid, I** pp) { - if (pp != NULL) { + if (pp != nullptr) { return ptr->QueryInterface(rclsid, (void**)pp); } else { return E_FAIL; @@ -60,12 +60,12 @@ public: } ~SmartCOMPtr() { - if (ptr != NULL) + if (ptr != nullptr) ptr->Release(); } private: - T* ptr = NULL; + T* ptr = nullptr; }; class SmartBSTR @@ -79,7 +79,7 @@ public: ~SmartBSTR() throw() { ::SysFreeString(str); } private: - BSTR str = NULL; + BSTR str = nullptr; }; struct VSInstanceInfo diff --git a/Source/cmVisualStudio10TargetGenerator.cxx b/Source/cmVisualStudio10TargetGenerator.cxx index 6a1966c..753a532 100644 --- a/Source/cmVisualStudio10TargetGenerator.cxx +++ b/Source/cmVisualStudio10TargetGenerator.cxx @@ -2675,7 +2675,7 @@ void cmVisualStudio10TargetGenerator::OutputSourceSpecificFlags( ? "C" : this->GlobalGenerator->GetLanguageFromExtension(ext.c_str()); std::string lang = this->LocalGenerator->GetSourceFileLanguage(sf); - const char* compileAs = 0; + const char* compileAs = nullptr; if (lang != extLang) { if (lang == "CXX") { // force a C++ file type diff --git a/Source/cmVisualStudioSlnData.cxx b/Source/cmVisualStudioSlnData.cxx index 2a6dfc4..739183f 100644 --- a/Source/cmVisualStudioSlnData.cxx +++ b/Source/cmVisualStudioSlnData.cxx @@ -56,7 +56,7 @@ cmSlnProjectEntry* cmSlnData::AddProject( { ProjectStorage::iterator it(ProjectsByGUID.find(projectGUID)); if (it != ProjectsByGUID.end()) - return NULL; + return nullptr; it = ProjectsByGUID .insert(ProjectStorage::value_type( projectGUID, diff --git a/Source/cmVisualStudioWCEPlatformParser.cxx b/Source/cmVisualStudioWCEPlatformParser.cxx index 2f71cf5..175bd4e 100644 --- a/Source/cmVisualStudioWCEPlatformParser.cxx +++ b/Source/cmVisualStudioWCEPlatformParser.cxx @@ -50,7 +50,7 @@ const char* cmVisualStudioWCEPlatformParser::GetArchitectureFamily() const return it->second.c_str(); } - return 0; + return nullptr; } void cmVisualStudioWCEPlatformParser::StartElement(const std::string& name, diff --git a/Source/cmVisualStudioWCEPlatformParser.h b/Source/cmVisualStudioWCEPlatformParser.h index e0a4def..895a90d 100644 --- a/Source/cmVisualStudioWCEPlatformParser.h +++ b/Source/cmVisualStudioWCEPlatformParser.h @@ -16,7 +16,7 @@ class cmVisualStudioWCEPlatformParser : public cmXMLParser { public: - cmVisualStudioWCEPlatformParser(const char* name = NULL) + cmVisualStudioWCEPlatformParser(const char* name = nullptr) : RequiredName(name) { } |