diff options
author | Tushar Maheshwari <tushar27192@gmail.com> | 2019-09-08 12:03:03 (GMT) |
---|---|---|
committer | Brad King <brad.king@kitware.com> | 2019-09-18 18:32:56 (GMT) |
commit | 14da7aedf2a3a8f5d25be9c577aaff01fa1f70b6 (patch) | |
tree | a77d9eccdc0a2f8b016196150517d0e080fdbdc9 /Source/cmComputeLinkDepends.h | |
parent | 01cce69870ec7efbb8138f5345aa7ffed8b7ac12 (diff) | |
download | CMake-14da7aedf2a3a8f5d25be9c577aaff01fa1f70b6.zip CMake-14da7aedf2a3a8f5d25be9c577aaff01fa1f70b6.tar.gz CMake-14da7aedf2a3a8f5d25be9c577aaff01fa1f70b6.tar.bz2 |
cmComputeLinkDepends: remove manual memory deallocation
- Replace owning raw `DependSetList` pointer with direct object.
- Use an extra `bool Initialized` flag to imitate `nullptr` semantics.
Diffstat (limited to 'Source/cmComputeLinkDepends.h')
-rw-r--r-- | Source/cmComputeLinkDepends.h | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/Source/cmComputeLinkDepends.h b/Source/cmComputeLinkDepends.h index f0ac771..203cc68 100644 --- a/Source/cmComputeLinkDepends.h +++ b/Source/cmComputeLinkDepends.h @@ -106,8 +106,9 @@ private: }; struct DependSetList : public std::vector<DependSet> { + bool Initialized = false; }; - std::vector<DependSetList*> InferredDependSets; + std::vector<DependSetList> InferredDependSets; void InferDependencies(); // Ordering constraint graph adjacency list. |