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 | |
parent | aebca2bd652dd7434a3026882c0b6584422eb718 (diff) |
Cleanup: Clang tidy
Diffstat (limited to 'source/blender/blenkernel/intern')
-rw-r--r-- | source/blender/blenkernel/intern/image.cc | 4 | ||||
-rw-r--r-- | source/blender/blenkernel/intern/mesh_calc_edges.cc | 6 | ||||
-rw-r--r-- | source/blender/blenkernel/intern/subdiv_mesh.c | 4 |
3 files changed, 6 insertions, 8 deletions
diff --git a/source/blender/blenkernel/intern/image.cc b/source/blender/blenkernel/intern/image.cc index 06a5d877882..b9bb536d173 100644 --- a/source/blender/blenkernel/intern/image.cc +++ b/source/blender/blenkernel/intern/image.cc @@ -3895,7 +3895,7 @@ static ImBuf *image_load_movie_file(Image *ima, ImageUser *iuser, int frame) } if (BKE_image_is_stereo(ima) && ima->views_format == R_IMF_VIEWS_STEREO_3D) { - IMB_ImBufFromStereo3d(ima->stereo3d_format, ibuf_arr[0], &ibuf_arr[0], &ibuf_arr[1]); + IMB_ImBufFromStereo3d(ima->stereo3d_format, ibuf_arr[0], ibuf_arr.data(), &ibuf_arr[1]); } for (int i = 0; i < totviews; i++) { @@ -4064,7 +4064,7 @@ static ImBuf *image_load_image_file( /* multi-views/multi-layers OpenEXR files directly populate ima, and return null ibuf... */ if (BKE_image_is_stereo(ima) && ima->views_format == R_IMF_VIEWS_STEREO_3D && ibuf_arr[0] && tot_viewfiles == 1 && totviews >= 2) { - IMB_ImBufFromStereo3d(ima->stereo3d_format, ibuf_arr[0], &ibuf_arr[0], &ibuf_arr[1]); + IMB_ImBufFromStereo3d(ima->stereo3d_format, ibuf_arr[0], ibuf_arr.data(), &ibuf_arr[1]); } /* return the original requested ImBuf */ 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()) { diff --git a/source/blender/blenkernel/intern/subdiv_mesh.c b/source/blender/blenkernel/intern/subdiv_mesh.c index ca4130d6bc4..433bad34479 100644 --- a/source/blender/blenkernel/intern/subdiv_mesh.c +++ b/source/blender/blenkernel/intern/subdiv_mesh.c @@ -5,9 +5,6 @@ * \ingroup bke */ -#include "BKE_mesh.h" -#include "BKE_subdiv_mesh.h" - #include "atomic_ops.h" #include "DNA_key_types.h" @@ -24,6 +21,7 @@ #include "BKE_subdiv.h" #include "BKE_subdiv_eval.h" #include "BKE_subdiv_foreach.h" +#include "BKE_subdiv_mesh.h" #include "MEM_guardedalloc.h" |