Do you really need to redeclare arc_it every loop iteration.  I would move `std::vector<Arc>::const_iterator arc_it;` to the top of the function and leave this line as `arc_it = arcs.begin();`