From 973cb29d841a37f0c101cc20433329a83400d894 Mon Sep 17 00:00:00 2001 From: Campbell Barton Date: Sun, 18 Nov 2012 02:41:55 +0000 Subject: style cleanup: if's on the same line. --- source/blender/editors/curve/editcurve.c | 8 +++++--- source/blender/editors/interface/interface_regions.c | 4 ++-- 2 files changed, 7 insertions(+), 5 deletions(-) (limited to 'source/blender/editors') diff --git a/source/blender/editors/curve/editcurve.c b/source/blender/editors/curve/editcurve.c index 957dcfbd848..348b98a0380 100644 --- a/source/blender/editors/curve/editcurve.c +++ b/source/blender/editors/curve/editcurve.c @@ -3678,10 +3678,12 @@ static int is_u_selected(Nurb *nu, int u) /* what about resolu == 2? */ bp = &nu->bp[u]; for (v = 0; v < nu->pntsv - 1; v++, bp += nu->pntsu) { - if (v) if (bp->f1 & SELECT) return 1; + if ((v != 0) && (bp->f1 & SELECT)) { + return TRUE; + } } - return 0; + return FALSE; } typedef struct NurbSort { @@ -6464,7 +6466,7 @@ Nurb *add_nurbs_primitive(bContext *C, Object *obedit, float mat[4][4], int type bp->vec[0] += fac * grid; fac = (float)b - 1.5f; bp->vec[1] += fac * grid; - if (a == 1 || a == 2) if (b == 1 || b == 2) { + if ((a == 1 || a == 2) && (b == 1 || b == 2)) { bp->vec[2] += grid; } mul_m4_v3(mat, bp->vec); diff --git a/source/blender/editors/interface/interface_regions.c b/source/blender/editors/interface/interface_regions.c index 9b77072dee1..c1547593f96 100644 --- a/source/blender/editors/interface/interface_regions.c +++ b/source/blender/editors/interface/interface_regions.c @@ -1409,8 +1409,8 @@ static void ui_block_position(wmWindow *window, ARegion *butregion, uiBut *but, dir1 &= (UI_TOP | UI_DOWN); } - if (dir2 == 0) if (dir1 == UI_LEFT || dir1 == UI_RIGHT) dir2 = UI_DOWN; - if (dir2 == 0) if (dir1 == UI_TOP || dir1 == UI_DOWN) dir2 = UI_LEFT; + if ((dir2 == 0) && (dir1 == UI_LEFT || dir1 == UI_RIGHT)) dir2 = UI_DOWN; + if ((dir2 == 0) && (dir1 == UI_TOP || dir1 == UI_DOWN)) dir2 = UI_LEFT; /* no space at all? don't change */ if (left || right) { -- cgit v1.2.3