From b20da1f04972ca89041b04f562103cfbf8fdec4d Mon Sep 17 00:00:00 2001 From: Jan Orend <56254096+3dJan@users.noreply.github.com> Date: Wed, 8 Nov 2023 15:52:18 +0100 Subject: [PATCH] [GraphAlgorithms] Resolving signed/unsigned mismatch --- Source/Common/Graph/GraphAlgorithms.cpp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/Source/Common/Graph/GraphAlgorithms.cpp b/Source/Common/Graph/GraphAlgorithms.cpp index a6999686b..23980d9a4 100644 --- a/Source/Common/Graph/GraphAlgorithms.cpp +++ b/Source/Common/Graph/GraphAlgorithms.cpp @@ -43,7 +43,7 @@ namespace NMR::common::graph visited[node] = true; recStack[node] = true; - for (auto dep = 0; dep < static_cast(graph.getSize()); ++dep) + for (Identifier dep = 0u; dep < static_cast(graph.getSize()); ++dep) { if (graph.isDirectlyDependingOn(node, dep)) { @@ -67,7 +67,7 @@ namespace NMR::common::graph std::vector visited(graph.getSize(), false); std::vector recStack(graph.getSize(), false); - for (auto id = 0; id < static_cast(graph.getSize()); ++id) + for (Identifier id = 0u; id < static_cast(graph.getSize()); ++id) { if (isCyclicUtil(graph, id, visited, recStack)) { @@ -94,7 +94,7 @@ namespace NMR::common::graph std::vector visited(graph.getSize(), false); VertexList topologicalOrder; - for (auto id = 0; id < static_cast(graph.getSize()); ++id) + for (Identifier id = 0u; id < static_cast(graph.getSize()); ++id) { if (!visited[id]) { @@ -114,7 +114,7 @@ namespace NMR::common::graph visited[nodeId] = true; nodesToVisit.push({NodeType::PARENT, nodeId}); - for (auto dep = 0; dep < static_cast(graph.getSize()); ++dep) + for (Identifier dep = 0u; dep < static_cast(graph.getSize()); ++dep) { if (!visited[dep]) {