diff options
author | Ben Boeckel <ben.boeckel@kitware.com> | 2023-01-26 18:23:42 (GMT) |
---|---|---|
committer | Ben Boeckel <ben.boeckel@kitware.com> | 2023-01-31 14:27:06 (GMT) |
commit | 65c0a64dc5bc7cb0e13721500bdd754b6630e8ea (patch) | |
tree | 327a4dc86d33fb406ebeea660c61ec7bc863907d /Source/cmComputeTargetDepends.cxx | |
parent | 50abdaab936e6b1a7e40d17affae03f89ac00da6 (diff) | |
download | CMake-65c0a64dc5bc7cb0e13721500bdd754b6630e8ea.zip CMake-65c0a64dc5bc7cb0e13721500bdd754b6630e8ea.tar.gz CMake-65c0a64dc5bc7cb0e13721500bdd754b6630e8ea.tar.bz2 |
cmComputeComponentGraph: use a name for "invalid component"
This is to prepare for making the graph use `size_t`.
Diffstat (limited to 'Source/cmComputeTargetDepends.cxx')
-rw-r--r-- | Source/cmComputeTargetDepends.cxx | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/Source/cmComputeTargetDepends.cxx b/Source/cmComputeTargetDepends.cxx index 3ff16a4..337bafb 100644 --- a/Source/cmComputeTargetDepends.cxx +++ b/Source/cmComputeTargetDepends.cxx @@ -693,7 +693,7 @@ bool cmComputeTargetDepends::IntraComponent(std::vector<int> const& cmap, } // Prepend to a linear linked-list of intra-component edges. - if (*head >= 0) { + if (*head != cmComputeComponentGraph::INVALID_COMPONENT) { this->FinalGraph[i].emplace_back(*head, false, false, cmListFileBacktrace()); } else { @@ -721,7 +721,7 @@ bool cmComputeTargetDepends::ComputeFinalDepends( this->ComponentTail.resize(components.size()); int nc = static_cast<int>(components.size()); for (int c = 0; c < nc; ++c) { - int head = -1; + int head = cmComputeComponentGraph::INVALID_COMPONENT; std::set<int> emitted; NodeList const& nl = components[c]; for (int ni : cmReverseRange(nl)) { |