Make looping through all leaf nodes less confusing

This commit is contained in:
Daniel J. Hofmann 2016-05-17 13:54:18 -04:00 committed by Patrick Niklaus
parent 8291be375a
commit 9d7714c714
No known key found for this signature in database
GPG Key ID: E426891B5F978B1B

View File

@ -373,7 +373,7 @@ std::size_t Contractor::LoadEdgeExpandedGraph(
leaf_node_file.seekg(0, std::ios::beg); leaf_node_file.seekg(0, std::ios::beg);
LeafNode current_node; LeafNode current_node;
while (leaf_nodes_count > 0) for(; leaf_nodes_count > 0; --leaf_nodes_count)
{ {
leaf_node_file.read(reinterpret_cast<char *>(&current_node), sizeof(current_node)); leaf_node_file.read(reinterpret_cast<char *>(&current_node), sizeof(current_node));
@ -465,7 +465,6 @@ std::size_t Contractor::LoadEdgeExpandedGraph(
} }
} }
} }
--leaf_nodes_count;
} }
} }