diff --git a/common/main/render.h b/common/main/render.h index 5055771e4..4c313f1ac 100644 --- a/common/main/render.h +++ b/common/main/render.h @@ -27,6 +27,7 @@ COPYRIGHT 1993-1999 PARALLAX SOFTWARE CORPORATION. ALL RIGHTS RESERVED. #include "dxxsconf.h" #include "3d.h" +#include #include #include "objnum.h" #include "fwd-object.h" @@ -128,13 +129,7 @@ void render_start_frame(void); // Given a list of point numbers, rotate any that haven't been rotated // this frame -g3s_codes rotate_list(fvcvertptr &vcvertptr, std::size_t nv, const vertnum_t *pointnumlist); - -template -static inline g3s_codes rotate_list(fvcvertptr &vcvertptr, const std::array &a) -{ - return rotate_list(vcvertptr, a.size(), &a[0]); -} +g3s_codes rotate_list(fvcvertptr &vcvertptr, std::span pointnumlist); #ifdef dsx namespace dsx { diff --git a/similar/main/render.cpp b/similar/main/render.cpp index 9314f0dd9..d6552975e 100644 --- a/similar/main/render.cpp +++ b/similar/main/render.cpp @@ -701,7 +701,7 @@ void render_start_frame() } //Given a lit of point numbers, rotate any that haven't been rotated this frame -g3s_codes rotate_list(fvcvertptr &vcvertptr, const std::size_t nv, const vertnum_t *const pointnumlist) +g3s_codes rotate_list(fvcvertptr &vcvertptr, const std::span pointnumlist) { g3s_codes cc; const auto current_generation = s_current_generation; @@ -710,7 +710,7 @@ g3s_codes rotate_list(fvcvertptr &vcvertptr, const std::size_t nv, const vertnum ? 0.0f /* unused */ : 2.0f * (static_cast(timer_query()) / F1_0); - range_for (const auto pnum, unchecked_partial_range(pointnumlist, nv)) + for (const auto pnum : pointnumlist) { auto &pnt = Segment_points[pnum]; if (pnt.p3_last_generation != current_generation)