diff options
author | Campbell Barton <ideasman42@gmail.com> | 2016-07-06 12:15:47 +0300 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2016-07-06 12:15:47 +0300 |
commit | 95ff9e9904d1f31d9352220a8779b4ef35c16bd8 (patch) | |
tree | 31d98da86fc765c5c914c6ea8b98f6f13fe9448c /source/blender/blenkernel/intern/pbvh.c | |
parent | 674756bfcecef5ca644978f4e208674f9cd3a6b6 (diff) |
Cleanup: redundant 4th index in sculpt PBVH
Since moving to MLoopTri this is no longer needed.
Diffstat (limited to 'source/blender/blenkernel/intern/pbvh.c')
-rw-r--r-- | source/blender/blenkernel/intern/pbvh.c | 8 |
1 files changed, 3 insertions, 5 deletions
diff --git a/source/blender/blenkernel/intern/pbvh.c b/source/blender/blenkernel/intern/pbvh.c index 6b6d1b400ea..8afb5b2aafe 100644 --- a/source/blender/blenkernel/intern/pbvh.c +++ b/source/blender/blenkernel/intern/pbvh.c @@ -276,16 +276,14 @@ static void build_mesh_leaf_node(PBVH *bvh, PBVHNode *node) /* reserve size is rough guess */ GHash *map = BLI_ghash_int_new_ex("build_mesh_leaf_node gh", 2 * totface); - int (*face_vert_indices)[4] = MEM_callocN(sizeof(int[4]) * totface, + int (*face_vert_indices)[3] = MEM_mallocN(sizeof(int[3]) * totface, "bvh node face vert indices"); - node->face_vert_indices = (const int (*)[4])face_vert_indices; + node->face_vert_indices = (const int (*)[3])face_vert_indices; for (int i = 0; i < totface; ++i) { const MLoopTri *lt = &bvh->looptri[node->prim_indices[i]]; - const int sides = 3; - - for (int j = 0; j < sides; ++j) { + for (int j = 0; j < 3; ++j) { face_vert_indices[i][j] = map_insert_vert(bvh, map, &node->face_verts, &node->uniq_verts, bvh->mloop[lt->tri[j]].v); |