diff options
author | Vitaly Stakhovsky <vvs31415@gitlab.org> | 2021-05-10 15:00:00 (GMT) |
---|---|---|
committer | Vitaly Stakhovsky <vvs31415@gitlab.org> | 2021-05-10 15:44:53 (GMT) |
commit | ce97b7909bdd4be78c4be2e2326c5ae3e27a21f0 (patch) | |
tree | 32bc3a55e37750af01a03e90abbd78c9e1b948ff /Source/cmGeneratorTarget.cxx | |
parent | 2ee55f9718264d716eeabc9d61ede6e434443fd1 (diff) | |
download | CMake-ce97b7909bdd4be78c4be2e2326c5ae3e27a21f0.zip CMake-ce97b7909bdd4be78c4be2e2326c5ae3e27a21f0.tar.gz CMake-ce97b7909bdd4be78c4be2e2326c5ae3e27a21f0.tar.bz2 |
Source: Remove unnecessary comparisons to nullptr
Diffstat (limited to 'Source/cmGeneratorTarget.cxx')
-rw-r--r-- | Source/cmGeneratorTarget.cxx | 11 |
1 files changed, 5 insertions, 6 deletions
diff --git a/Source/cmGeneratorTarget.cxx b/Source/cmGeneratorTarget.cxx index 365f8b8..bbc0050 100644 --- a/Source/cmGeneratorTarget.cxx +++ b/Source/cmGeneratorTarget.cxx @@ -970,7 +970,7 @@ cmProp cmGeneratorTarget::GetPropertyWithPairedLanguageSupport( std::string const& lang, const char* suffix) const { cmProp propertyValue = this->Target->GetProperty(cmStrCat(lang, suffix)); - if (propertyValue == nullptr) { + if (!propertyValue) { // Check if we should use the value set by another language. if (lang == "OBJC") { propertyValue = this->GetPropertyWithPairedLanguageSupport("C", suffix); @@ -4715,21 +4715,20 @@ bool cmGeneratorTarget::ComputeCompileFeatures( cmStrCat(cmSystemTools::UpperCase(config), '-', language.first); BTs<std::string> const* standardToCopy = this->GetLanguageStandardProperty(language.second, config); - if (standardToCopy != nullptr) { + if (standardToCopy) { this->LanguageStandardMap[key] = *standardToCopy; generatorTargetLanguageStandard = &this->LanguageStandardMap[key]; } else { cmProp defaultStandard = this->Makefile->GetDefinition( cmStrCat("CMAKE_", language.second, "_STANDARD_DEFAULT")); - if (defaultStandard != nullptr) { + if (defaultStandard) { this->LanguageStandardMap[key] = BTs<std::string>(*defaultStandard); generatorTargetLanguageStandard = &this->LanguageStandardMap[key]; } } // Custom updates for the CUDA standard. - if (generatorTargetLanguageStandard != nullptr && - language.first == "CUDA") { + if (generatorTargetLanguageStandard && language.first == "CUDA") { if (generatorTargetLanguageStandard->Value == "98") { this->LanguageStandardMap[key].Value = "03"; } @@ -6771,7 +6770,7 @@ void cmGeneratorTarget::ComputeLinkInterfaceLibraries( return; } iface.Exists = true; - iface.Explicit = cmp0022NEW || explicitLibraries != nullptr; + iface.Explicit = cmp0022NEW || explicitLibraries; if (explicitLibraries) { // The interface libraries have been explicitly set. |