use boost::irange and range based for loop in // for (NodeID node = 0; node < last_node; ++node)

This commit is contained in:
Dennis Luxen 2014-07-17 10:30:56 +02:00
parent 7d90737921
commit 53c102e1e9

View File

@ -45,6 +45,7 @@ SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
#include <boost/assert.hpp>
#include <boost/filesystem.hpp>
#include <boost/range/irange.hpp>
#ifdef __APPLE__
#include <gdal.h>
@ -237,9 +238,9 @@ class TarjanSCC
unsigned component_index = 0, size_of_current_component = 0;
int index = 0;
NodeID last_node = m_node_based_graph->GetNumberOfNodes();
for (NodeID node = 0; node < last_node; ++node)
for(const NodeID node : boost::irange(0u, last_node))
{
if (std::numeric_limits<unsigned>::max() == components_index[node])
if (SPECIAL_NODEID == components_index[node])
{
recursion_stack.emplace(true, TarjanStackFrame(node, node));
}