From b16c5f7a7c28082704f17996b8899610879c6972 Mon Sep 17 00:00:00 2001 From: Kp Date: Sun, 9 Oct 2022 23:15:20 +0000 Subject: [PATCH] Use std::ranges::subrange for sort_seg_children The full functionality of partial_range is not necessary. --- similar/main/render.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/similar/main/render.cpp b/similar/main/render.cpp index 61be3125c..d2594b067 100644 --- a/similar/main/render.cpp +++ b/similar/main/render.cpp @@ -1040,7 +1040,7 @@ static bool compare_children(fvcvertptr &vcvertptr, const vms_vector &Viewer_eye //short the children of segment to render in the correct order //returns non-zero if swaps were made using sort_child_array_t = per_side_array; -static void sort_seg_children(fvcvertptr &vcvertptr, const vms_vector &Viewer_eye, const vcsegptridx_t seg, const partial_range_t &r) +static void sort_seg_children(fvcvertptr &vcvertptr, const vms_vector &Viewer_eye, const vcsegptridx_t seg, const std::ranges::subrange &r) { //for each child, compare with other children and see if order matters //if order matters, fix if wrong @@ -1398,7 +1398,7 @@ static void build_segment_list(render_state_t &rstate, const vms_vector &Viewer_ continue; //now order the sides in some magical way - const auto &&child_range = partial_range_t(child_begin, child_iter); + const auto &&child_range = std::ranges::subrange(child_begin, child_iter); sort_seg_children(vcvertptr, Viewer_eye, seg, child_range); project_list(seg->verts); range_for (const auto siden, child_range)