diff options
author | Campbell Barton <ideasman42@gmail.com> | 2012-10-31 14:09:06 +0400 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2012-10-31 14:09:06 +0400 |
commit | 00b8c2afa195bb2e8aaf9afd8cd43d0100e0ce94 (patch) | |
tree | d78d7a07f98bbd64f615fbe407bdf2a972c31fe1 /source/blender/blenkernel | |
parent | 12ed0c64bc7062f46cd1307b5566e99064330733 (diff) |
style cleanup
Diffstat (limited to 'source/blender/blenkernel')
-rw-r--r-- | source/blender/blenkernel/intern/cdderivedmesh.c | 11 | ||||
-rw-r--r-- | source/blender/blenkernel/intern/curve.c | 5 | ||||
-rw-r--r-- | source/blender/blenkernel/intern/texture.c | 3 |
3 files changed, 9 insertions, 10 deletions
diff --git a/source/blender/blenkernel/intern/cdderivedmesh.c b/source/blender/blenkernel/intern/cdderivedmesh.c index e11fd5a9424..c6d5e4ed727 100644 --- a/source/blender/blenkernel/intern/cdderivedmesh.c +++ b/source/blender/blenkernel/intern/cdderivedmesh.c @@ -741,13 +741,16 @@ static void cdDM_drawFacesTex_common(DerivedMesh *dm, else { if (index_mf_to_mpoly) { orig = DM_origindex_mface_mpoly(index_mf_to_mpoly, index_mp_to_orig, actualFace); - if (orig == ORIGINDEX_NONE) continue; - if (drawParamsMapped) + if (orig == ORIGINDEX_NONE) { + continue; + } + if (drawParamsMapped) { draw_option = drawParamsMapped(userData, orig); + } } - else - if (drawParamsMapped) + else if (drawParamsMapped) { draw_option = drawParamsMapped(userData, actualFace); + } } /* flush buffer if current triangle isn't drawable or it's last triangle */ diff --git a/source/blender/blenkernel/intern/curve.c b/source/blender/blenkernel/intern/curve.c index 06dad495d81..4515273d7d9 100644 --- a/source/blender/blenkernel/intern/curve.c +++ b/source/blender/blenkernel/intern/curve.c @@ -818,10 +818,7 @@ static void basisNurb(float t, short order, short pnts, float *knots, float *bas opp2 = orderpluspnts - 1; /* this is for float inaccuracy */ - if (t < knots[0]) - t = knots[0]; - else - if (t > knots[opp2]) t = knots[opp2]; + t = (t < knots[0]) ? knots[0] : knots[opp2]; /* this part is order '1' */ o2 = order + 1; diff --git a/source/blender/blenkernel/intern/texture.c b/source/blender/blenkernel/intern/texture.c index efc7a281636..6d0313f6334 100644 --- a/source/blender/blenkernel/intern/texture.c +++ b/source/blender/blenkernel/intern/texture.c @@ -909,8 +909,7 @@ void autotexname(Tex *tex) if (tex->use_nodes) { new_id(&bmain->tex, (ID *)tex, "Noddy"); } - else - if (tex->type == TEX_IMAGE) { + else if (tex->type == TEX_IMAGE) { ima = tex->ima; if (ima) { BLI_strncpy(di, ima->name, sizeof(di)); |