@@ -290,7 +290,7 @@ namespace osmium {
290290 }
291291 }
292292
293- ProtoRing* find_enclosing_ring (NodeRefSegment* segment) {
293+ ProtoRing* find_enclosing_ring (NodeRefSegment const * segment) {
294294 if (debug ()) {
295295 std::cerr << " Looking for ring enclosing " << *segment << " \n " ;
296296 }
@@ -553,7 +553,7 @@ namespace osmium {
553553 return ;
554554 }
555555
556- std::stable_sort (rings.begin (), rings.end (), [](ProtoRing* a, ProtoRing* b) {
556+ std::stable_sort (rings.begin (), rings.end (), [](ProtoRing const * a, ProtoRing const * b) {
557557 return a->min_segment () < b->min_segment ();
558558 });
559559
@@ -824,7 +824,7 @@ namespace osmium {
824824 });
825825
826826 find_inner_outer_complex ();
827- ProtoRing* outer_ring = find_enclosing_ring (ring_min->ring ().min_segment ());
827+ const ProtoRing* outer_ring = find_enclosing_ring (ring_min->ring ().min_segment ());
828828 const bool ring_min_is_outer = !outer_ring;
829829 if (debug ()) {
830830 std::cerr << " Open ring is " << (ring_min_is_outer ? " outer" : " inner" ) << " ring\n " ;
@@ -858,7 +858,7 @@ namespace osmium {
858858 if (!open_ring_its.empty ()) {
859859 ++m_stats.open_rings ;
860860 if (m_config.problem_reporter ) {
861- for (auto & it : open_ring_its) {
861+ for (const auto & it : open_ring_its) {
862862 m_config.problem_reporter ->report_ring_not_closed (it->get_node_ref_start (), nullptr );
863863 m_config.problem_reporter ->report_ring_not_closed (it->get_node_ref_stop (), nullptr );
864864 }
@@ -912,7 +912,7 @@ namespace osmium {
912912 [this , &location](const slocation& lhs, const slocation& rhs) {
913913 return lhs.location (m_segment_list, location) < rhs.location (m_segment_list, location);
914914 }));
915- for (auto & loc : locs) {
915+ for (const auto & loc : locs) {
916916 if (!m_segment_list[loc.item ].is_done ()) {
917917 count_remaining -= add_new_ring_complex (loc);
918918 if (count_remaining == 0 ) {
0 commit comments