diff options
author | Hans Goudey <h.goudey@me.com> | 2022-06-10 11:29:35 +0300 |
---|---|---|
committer | Hans Goudey <h.goudey@me.com> | 2022-06-10 11:29:35 +0300 |
commit | 6a11cd036cefd99689866ddd8f63861f9383766a (patch) | |
tree | c3ebdfc383cb77c08364c6cffab5fe6adee75a32 /source/blender/blenkernel/intern/mesh_calc_edges.cc | |
parent | aebca2bd652dd7434a3026882c0b6584422eb718 (diff) |
Cleanup: Clang tidy
Diffstat (limited to 'source/blender/blenkernel/intern/mesh_calc_edges.cc')
-rw-r--r-- | source/blender/blenkernel/intern/mesh_calc_edges.cc | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/source/blender/blenkernel/intern/mesh_calc_edges.cc b/source/blender/blenkernel/intern/mesh_calc_edges.cc index 5895eb7fd71..31e20750cf2 100644 --- a/source/blender/blenkernel/intern/mesh_calc_edges.cc +++ b/source/blender/blenkernel/intern/mesh_calc_edges.cc @@ -81,7 +81,7 @@ static void add_existing_edges_to_hash_maps(Mesh *mesh, { /* Assume existing edges are valid. */ threading::parallel_for_each(edge_maps, [&](EdgeMap &edge_map) { - const int task_index = &edge_map - &edge_maps[0]; + const int task_index = &edge_map - edge_maps.data(); for (const MEdge &edge : Span(mesh->medge, mesh->totedge)) { OrderedEdge ordered_edge{edge.v1, edge.v2}; /* Only add the edge when it belongs into this map. */ @@ -98,7 +98,7 @@ static void add_polygon_edges_to_hash_maps(Mesh *mesh, { const Span<MLoop> loops{mesh->mloop, mesh->totloop}; threading::parallel_for_each(edge_maps, [&](EdgeMap &edge_map) { - const int task_index = &edge_map - &edge_maps[0]; + const int task_index = &edge_map - edge_maps.data(); for (const MPoly &poly : Span(mesh->mpoly, mesh->totpoly)) { Span<MLoop> poly_loops = loops.slice(poly.loopstart, poly.totloop); const MLoop *prev_loop = &poly_loops.last(); @@ -131,7 +131,7 @@ static void serialize_and_initialize_deduplicated_edges(MutableSpan<EdgeMap> edg } threading::parallel_for_each(edge_maps, [&](EdgeMap &edge_map) { - const int task_index = &edge_map - &edge_maps[0]; + const int task_index = &edge_map - edge_maps.data(); int new_edge_index = edge_index_offsets[task_index]; for (EdgeMap::MutableItem item : edge_map.items()) { |