diff --git a/src/Layers/xrRender_R2/r2_R_lights.cpp b/src/Layers/xrRender_R2/r2_R_lights.cpp index 95d3c5045a0..d88a8d92785 100644 --- a/src/Layers/xrRender_R2/r2_R_lights.cpp +++ b/src/Layers/xrRender_R2/r2_R_lights.cpp @@ -59,7 +59,7 @@ void CRender::render_lights(light_Package& LP) for (u16 smap_ID = 0; refactored.size() != total; ++smap_ID) { LP_smap_pool.initialize(RImplementation.o.smapsize); - for (auto &L : source) + for (auto& L : source) { if (!L) continue; diff --git a/src/xrAICore/Navigation/level_graph_inline.h b/src/xrAICore/Navigation/level_graph_inline.h index c3a9b49a3f6..a9f76def73b 100644 --- a/src/xrAICore/Navigation/level_graph_inline.h +++ b/src/xrAICore/Navigation/level_graph_inline.h @@ -572,34 +572,34 @@ template IC void CLevelGraph::iterate_vertices( const Fvector& min_position, const Fvector& max_position, const P& predicate) const { - auto [I, E] = get_range(min_position, max_position); + auto [begin, end] = get_range(min_position, max_position); - for (; I != E; ++I) - predicate(*I); + for (; begin != end; ++begin) + predicate(*begin); } -IC std::pair CLevelGraph::get_range(const Fvector& min_position, const Fvector& max_position) const +IC std::pair CLevelGraph::get_range(const Fvector& min_position, const Fvector& max_position) const { - const auto begin = m_nodes->begin(), end = m_nodes->end(); + const auto _begin = m_nodes->begin(), _end = m_nodes->end(); - CLevelVertex *I, *E; + CLevelVertex *begin, *end; if (valid_vertex_position(min_position)) - I = std::lower_bound( - begin, end, vertex_position(min_position).xz(), &vertex::predicate2); + begin = std::lower_bound( + _begin, _end, vertex_position(min_position).xz(), &vertex::predicate2); else - I = begin; + begin = _begin; if (valid_vertex_position(max_position)) { - E = std::upper_bound( - begin, end, vertex_position(max_position).xz(), &vertex::predicate); - if (E != (end)) - ++E; + end = std::upper_bound( + _begin, _end, vertex_position(max_position).xz(), &vertex::predicate); + if (end != (_end)) + ++end; } else - E = end; + end = _end; - return {I, E}; + return { begin, end }; } IC u32 CLevelGraph::max_x() const { return (m_max_x); } diff --git a/src/xrGame/cover_manager.cpp b/src/xrGame/cover_manager.cpp index 8cb9c7d0242..95125f88481 100644 --- a/src/xrGame/cover_manager.cpp +++ b/src/xrGame/cover_manager.cpp @@ -76,7 +76,7 @@ void CCoverManager::compute_static_cover() xr_delete(m_covers); const CLevelGraph& graph = ai().level_graph(); - const LevelGraph::CHeader &levelGraphHeader = graph.header(); + const LevelGraph::CHeader& levelGraphHeader = graph.header(); const u32 levelVertexCount = levelGraphHeader.vertex_count(); m_covers = xr_new(levelGraphHeader.box(), levelGraphHeader.cell_size() * .5f, 8 * 65536, 4 * 65536); @@ -107,7 +107,7 @@ void CCoverManager::compute_static_cover() } } }); - for (auto &p : quadTreeStaticStorage) + for (auto& p : quadTreeStaticStorage) if (p.has_value()) m_covers->insert(&p.value()); diff --git a/src/xrGame/space_restriction_shape.cpp b/src/xrGame/space_restriction_shape.cpp index aeaace289b0..b574cdcaf94 100644 --- a/src/xrGame/space_restriction_shape.cpp +++ b/src/xrGame/space_restriction_shape.cpp @@ -86,7 +86,7 @@ void CSpaceRestrictionShape::fill_shape(const CCF_Shape::shape_def& shape) std::mutex mergeMutex; auto [begin, end] = graph.get_range(start, dest); - xr_parallel_for(TaskRange{begin, end}, [this, &mergeMutex, &graph] (auto &range) { + xr_parallel_for(TaskRange(begin, end), [this, &mergeMutex, &graph] (const auto& range) { xr_vector m_border_chunk; m_border_chunk.reserve(range.size()); for (auto &vertex : range) @@ -103,7 +103,7 @@ void CSpaceRestrictionShape::fill_shape(const CCF_Shape::shape_def& shape) }); #ifdef DEBUG - xr_parallel_for(TaskRange{begin, end}, [this, &mergeMutex, &graph] (const auto &range) { + xr_parallel_for(TaskRange(begin, end), [this, &mergeMutex, &graph] (const auto& range) { xr_vector m_test_storage_chunk; m_test_storage_chunk.reserve(range.size()); for (auto &vertex : range)