Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCampbell Barton <ideasman42@gmail.com>2016-04-12 04:26:06 +0300
committerCampbell Barton <ideasman42@gmail.com>2016-04-12 04:26:06 +0300
commit4a64b36029872034c9c138738010ced47b48e045 (patch)
tree4880dd52734a808c94cb74f69cc7a58a2855c584 /source/blender/editors
parenta2db16ba58a16be246f7f018ee78918d9c8a8aff (diff)
Cleanup: use bool
Diffstat (limited to 'source/blender/editors')
-rw-r--r--source/blender/editors/curve/editcurve.c16
-rw-r--r--source/blender/editors/sculpt_paint/paint_vertex.c2
2 files changed, 10 insertions, 8 deletions
diff --git a/source/blender/editors/curve/editcurve.c b/source/blender/editors/curve/editcurve.c
index 77fc7a83256..9df611b3216 100644
--- a/source/blender/editors/curve/editcurve.c
+++ b/source/blender/editors/curve/editcurve.c
@@ -1390,7 +1390,9 @@ void CURVE_OT_split(wmOperatorType *ot)
/* ******************* FLAGS ********************* */
-static short isNurbselUV(Nurb *nu, int *u, int *v, int flag)
+static bool isNurbselUV(
+ const Nurb *nu, int flag,
+ int *r_u, int *r_v)
{
/* return (u != -1): 1 row in u-direction selected. U has value between 0-pntsv
* return (v != -1): 1 column in v-direction selected. V has value between 0-pntsu
@@ -1398,7 +1400,7 @@ static short isNurbselUV(Nurb *nu, int *u, int *v, int flag)
BPoint *bp;
int a, b, sel;
- *u = *v = -1;
+ *r_u = *r_v = -1;
bp = nu->bp;
for (b = 0; b < nu->pntsv; b++) {
@@ -1407,7 +1409,7 @@ static short isNurbselUV(Nurb *nu, int *u, int *v, int flag)
if (bp->f1 & flag) sel++;
}
if (sel == nu->pntsu) {
- if (*u == -1) *u = b;
+ if (*r_u == -1) *r_u = b;
else return 0;
}
else if (sel > 1) {
@@ -1422,7 +1424,7 @@ static short isNurbselUV(Nurb *nu, int *u, int *v, int flag)
if (bp->f1 & flag) sel++;
}
if (sel == nu->pntsv) {
- if (*v == -1) *v = a;
+ if (*r_v == -1) *r_v = a;
else return 0;
}
else if (sel > 1) {
@@ -1430,8 +1432,8 @@ static short isNurbselUV(Nurb *nu, int *u, int *v, int flag)
}
}
- if (*u == -1 && *v > -1) return 1;
- if (*v == -1 && *u > -1) return 1;
+ if (*r_u == -1 && *r_v > -1) return 1;
+ if (*r_v == -1 && *r_u > -1) return 1;
return 0;
}
@@ -1851,7 +1853,7 @@ bool ed_editnurb_extrude_flag(EditNurb *editnurb, const short flag)
else {
/* which row or column is selected */
- if (isNurbselUV(nu, &u, &v, flag)) {
+ if (isNurbselUV(nu, flag, &u, &v)) {
/* deselect all */
bp = nu->bp;
diff --git a/source/blender/editors/sculpt_paint/paint_vertex.c b/source/blender/editors/sculpt_paint/paint_vertex.c
index bf751bfe74a..4d3712c6e3e 100644
--- a/source/blender/editors/sculpt_paint/paint_vertex.c
+++ b/source/blender/editors/sculpt_paint/paint_vertex.c
@@ -2979,7 +2979,7 @@ typedef struct DMGradient_userData {
const float *sco_end; /* [2] */
float sco_line_div; /* store (1.0f / len_v2v2(sco_start, sco_end)) */
int def_nr;
- short is_init;
+ bool is_init;
DMGradient_vertStore *vert_cache;
/* only for init */
BLI_bitmap *vert_visit;