mirror of
https://github.com/Kitware/CMake.git
synced 2026-05-13 01:29:02 -05:00
cmComputeComponentGraph: Move work out of constructor into Compute() method
The computation of Tarjan's algorithm is an expensive operation which should not be done in the constructor. Move this work into a dedicated Compute() method, and call this method explicitly.
This commit is contained in:
@@ -31,6 +31,9 @@ public:
|
||||
cmComputeComponentGraph(Graph const& input);
|
||||
~cmComputeComponentGraph();
|
||||
|
||||
/** Run the computation. */
|
||||
void Compute();
|
||||
|
||||
/** Get the adjacency list of the component graph. */
|
||||
Graph const& GetComponentGraph() const { return this->ComponentGraph; }
|
||||
EdgeList const& GetComponentGraphEdges(int c) const
|
||||
|
||||
Reference in New Issue
Block a user