Skip to content

Commit

Permalink
[GraphAlgorithms] Resolving signed/unsigned mismatch
Browse files Browse the repository at this point in the history
  • Loading branch information
3dJan committed Nov 8, 2023
1 parent 9cb3d4f commit b20da1f
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions Source/Common/Graph/GraphAlgorithms.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ namespace NMR::common::graph
visited[node] = true;
recStack[node] = true;

for (auto dep = 0; dep < static_cast<Identifier>(graph.getSize()); ++dep)
for (Identifier dep = 0u; dep < static_cast<Identifier>(graph.getSize()); ++dep)
{
if (graph.isDirectlyDependingOn(node, dep))
{
Expand All @@ -67,7 +67,7 @@ namespace NMR::common::graph
std::vector<bool> visited(graph.getSize(), false);
std::vector<bool> recStack(graph.getSize(), false);

for (auto id = 0; id < static_cast<Identifier>(graph.getSize()); ++id)
for (Identifier id = 0u; id < static_cast<Identifier>(graph.getSize()); ++id)
{
if (isCyclicUtil(graph, id, visited, recStack))
{
Expand All @@ -94,7 +94,7 @@ namespace NMR::common::graph
std::vector<bool> visited(graph.getSize(), false);
VertexList topologicalOrder;

for (auto id = 0; id < static_cast<Identifier>(graph.getSize()); ++id)
for (Identifier id = 0u; id < static_cast<Identifier>(graph.getSize()); ++id)
{
if (!visited[id])
{
Expand All @@ -114,7 +114,7 @@ namespace NMR::common::graph
visited[nodeId] = true;
nodesToVisit.push({NodeType::PARENT, nodeId});

for (auto dep = 0; dep < static_cast<Identifier>(graph.getSize()); ++dep)
for (Identifier dep = 0u; dep < static_cast<Identifier>(graph.getSize()); ++dep)
{
if (!visited[dep])
{
Expand Down

0 comments on commit b20da1f

Please sign in to comment.