From bca782342342f6b9265a2a0e93b9bb96fd5babfc Mon Sep 17 00:00:00 2001 From: Kp Date: Sat, 17 Jun 2017 23:05:15 +0000 Subject: [PATCH] Use range_for+partial_range in paging_touch_model --- similar/main/paging.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/similar/main/paging.cpp b/similar/main/paging.cpp index 7867d289e..31af4763c 100644 --- a/similar/main/paging.cpp +++ b/similar/main/paging.cpp @@ -105,10 +105,10 @@ static void paging_touch_object_effects( int tmap_num ) static void paging_touch_model( int modelnum ) { const auto &pm = Polygon_models[modelnum]; - uint_fast32_t i = pm.first_texture; - for (const uint_fast32_t e = i + pm.n_textures; i != e; ++i) + const uint_fast32_t b = pm.first_texture; + const uint_fast32_t e = b + pm.n_textures; + range_for (const auto p, partial_range(ObjBitmapPtrs, b, e)) { - const auto p = ObjBitmapPtrs[i]; PIGGY_PAGE_IN(ObjBitmaps[p]); paging_touch_object_effects(p); }