summaryrefslogtreecommitdiffstats
path: root/Source/cmLinkItemGraphVisitor.cxx
diff options
context:
space:
mode:
authorVitaly Stakhovsky <vvs31415@users.noreply.gitlab.com>2024-08-27 13:30:00 (GMT)
committerVitaly Stakhovsky <vvs31415@users.noreply.gitlab.com>2024-08-27 14:56:38 (GMT)
commit58da4aa47df7d12c54c2d3f26722eca5dd8ee10f (patch)
treec5d9bf243c3ec1526fd9e171f28d581a6af57e70 /Source/cmLinkItemGraphVisitor.cxx
parent72607d3402b91c3a9f4579c86175e4ca1ce6aa4e (diff)
downloadCMake-58da4aa47df7d12c54c2d3f26722eca5dd8ee10f.zip
CMake-58da4aa47df7d12c54c2d3f26722eca5dd8ee10f.tar.gz
CMake-58da4aa47df7d12c54c2d3f26722eca5dd8ee10f.tar.bz2
Source: Avoid comparing pointers to nullptr
Diffstat (limited to 'Source/cmLinkItemGraphVisitor.cxx')
-rw-r--r--Source/cmLinkItemGraphVisitor.cxx6
1 files changed, 3 insertions, 3 deletions
diff --git a/Source/cmLinkItemGraphVisitor.cxx b/Source/cmLinkItemGraphVisitor.cxx
index eabc8b9..ca574d4 100644
--- a/Source/cmLinkItemGraphVisitor.cxx
+++ b/Source/cmLinkItemGraphVisitor.cxx
@@ -24,7 +24,7 @@ void cmLinkItemGraphVisitor::VisitItem(cmLinkItem const& item)
void cmLinkItemGraphVisitor::VisitLinks(cmLinkItem const& item,
cmLinkItem const& rootItem)
{
- if (item.Target == nullptr) {
+ if (!item.Target) {
return;
}
@@ -100,7 +100,7 @@ void cmLinkItemGraphVisitor::GetDependencies(cmGeneratorTarget const& target,
{
const auto* implementationLibraries = target.GetLinkImplementationLibraries(
config, cmGeneratorTarget::UseTo::Link);
- if (implementationLibraries != nullptr) {
+ if (implementationLibraries) {
for (auto const& lib : implementationLibraries->Libraries) {
auto const& name = lib.AsStr();
dependencies[name] = Dependency(DependencyType::LinkPrivate, lib);
@@ -109,7 +109,7 @@ void cmLinkItemGraphVisitor::GetDependencies(cmGeneratorTarget const& target,
const auto* interfaceLibraries = target.GetLinkInterfaceLibraries(
config, &target, cmGeneratorTarget::UseTo::Compile);
- if (interfaceLibraries != nullptr) {
+ if (interfaceLibraries) {
for (auto const& lib : interfaceLibraries->Libraries) {
auto const& name = lib.AsStr();
if (dependencies.find(name) != dependencies.cend()) {