diff options
Diffstat (limited to 'source/blender/bmesh')
-rw-r--r-- | source/blender/bmesh/intern/bmesh_interp.c | 2 | ||||
-rw-r--r-- | source/blender/bmesh/intern/bmesh_marking.c | 2 | ||||
-rw-r--r-- | source/blender/bmesh/intern/bmesh_mesh_conv.c | 2 | ||||
-rw-r--r-- | source/blender/bmesh/intern/bmesh_mods.c | 2 |
4 files changed, 4 insertions, 4 deletions
diff --git a/source/blender/bmesh/intern/bmesh_interp.c b/source/blender/bmesh/intern/bmesh_interp.c index 9033436d1b2..12fcd51c069 100644 --- a/source/blender/bmesh/intern/bmesh_interp.c +++ b/source/blender/bmesh/intern/bmesh_interp.c @@ -424,7 +424,7 @@ static void bm_loop_interp_mdisps(BMesh *bm, BMLoop *target, BMFace *source) float axis_x[3], axis_y[3]; /* ignore 2-edged faces */ - if (target->f->len < 3) + if (UNLIKELY(target->f->len < 3)) return; if (!CustomData_has_layer(&bm->ldata, CD_MDISPS)) diff --git a/source/blender/bmesh/intern/bmesh_marking.c b/source/blender/bmesh/intern/bmesh_marking.c index c0439311104..e4a838fe893 100644 --- a/source/blender/bmesh/intern/bmesh_marking.c +++ b/source/blender/bmesh/intern/bmesh_marking.c @@ -672,7 +672,7 @@ void BM_editselection_plane(BMEditSelection *ese, float r_plane[3]) * we cant make a crossvec from a vec thats the same as the vec * unlikely but possible, so make sure if the normal is (0, 0, 1) * that vec isn't the same or in the same direction even. */ - if (efa->len < 3) { + if (UNLIKELY(efa->len < 3)) { /* crappy fallback method */ if (efa->no[0] < 0.5f) vec[0] = 1.0f; else if (efa->no[1] < 0.5f) vec[1] = 1.0f; diff --git a/source/blender/bmesh/intern/bmesh_mesh_conv.c b/source/blender/bmesh/intern/bmesh_mesh_conv.c index 51c8b5d3bd8..e6827b1f2cd 100644 --- a/source/blender/bmesh/intern/bmesh_mesh_conv.c +++ b/source/blender/bmesh/intern/bmesh_mesh_conv.c @@ -758,7 +758,7 @@ void BM_mesh_bm_to_me(BMesh *bm, Mesh *me, int dotess) } if (!currkey) { - currkey = add_keyblock(me->key, bm->vdata.layers[i].name); + currkey = BKE_keyblock_add(me->key, bm->vdata.layers[i].name); currkey->uid = bm->vdata.layers[i].uid; } diff --git a/source/blender/bmesh/intern/bmesh_mods.c b/source/blender/bmesh/intern/bmesh_mods.c index 73e2d83520c..3195899ef01 100644 --- a/source/blender/bmesh/intern/bmesh_mods.c +++ b/source/blender/bmesh/intern/bmesh_mods.c @@ -558,7 +558,7 @@ BMEdge *BM_vert_collapse_faces(BMesh *bm, BMEdge *ke, BMVert *kv, float fac, /* cant kill data we loop on, build a list and remove those */ BLI_array_empty(bad_faces); BM_ITER_ELEM (f, &fiter, verts[i], BM_FACES_OF_VERT) { - if (f->len < 3) { + if (UNLIKELY(f->len < 3)) { BLI_array_append(bad_faces, f); } } |