4242#include " base/analysis/mcm/mcmgraph.h"
4343#include " base/analysis/mcm/mcm.h"
4444#include " base/analysis/mcm/mcmyto.h"
45- #include " base/base.h"
45+ #include < cassert>
46+ #include < map>
4647#include < memory>
48+ #include < set>
49+ #include < vector>
50+
51+
4752
4853namespace Graphs {
4954/* *
@@ -278,14 +283,16 @@ void addLongestDelayEdgesToMCMgraph(MCMgraph &g) {
278283 }
279284}
280285
286+ namespace {
287+
281288/* *
282289 * getAdjacentNodes ()
283290 * The function returns a list with nodes directly reachable from
284291 * node a (in case transpose if false). If transpose is 'true', the
285292 * graph is transposed and the function returns a list with nodes
286293 * which are directly reachable from a in the transposed graph.
287294 */
288- static MCMnodeRefs getAdjacentNodes (const MCMnode &a, bool transpose) {
295+ MCMnodeRefs getAdjacentNodes (const MCMnode &a, bool transpose) {
289296 MCMnodeRefs node_refs;
290297
291298 if (!transpose) {
@@ -311,7 +318,7 @@ static MCMnodeRefs getAdjacentNodes(const MCMnode &a, bool transpose) {
311318 * order. Its order is set to -1. If all nodes have order -1, a nullptr pointer is
312319 * returned.
313320 */
314- static const MCMnode *getNextNode (MCMnodes &nodes, v_int &order) {
321+ const MCMnode *getNextNode (MCMnodes &nodes, v_int &order) {
315322 const MCMnode *a = nullptr ;
316323 int orderA = -1 ;
317324
@@ -335,7 +342,7 @@ static const MCMnode *getNextNode(MCMnodes &nodes, v_int &order) {
335342 * dfsVisit ()
336343 * The visitor function of the DFS algorithm.
337344 */
338- static void dfsVisit (const MCMnode &u,
345+ void dfsVisit (const MCMnode &u,
339346 int &time,
340347 v_int &color,
341348 v_int &d,
@@ -367,6 +374,8 @@ static void dfsVisit(const MCMnode &u,
367374 f[u.id ] = time;
368375}
369376
377+ } // namespace
378+
370379/* *
371380 * dfsMCMgraph ()
372381 * The function performs a depth first search on the graph. The discover
@@ -470,7 +479,8 @@ treeVisitChildren(MCMgraph &g, std::vector<const MCMnode *> &pi, MCMnode *u, MCM
470479 break ;
471480 }
472481 }
473- ASSERT (v != nullptr , " There must always be a node v." );
482+ // There must always be a node v.
483+ assert ((v != nullptr ));
474484
475485 // Add node v to the component
476486 v->visible = true ;
0 commit comments