[Bf-blender-cvs] [7880f75] master: Cleanup: use bool

Campbell Barton noreply at git.blender.org
Tue Oct 7 14:04:41 CEST 2014


Commit: 7880f75e87ec5c1f7e7250f891a02e6566333d65
Author: Campbell Barton
Date:   Tue Oct 7 13:58:35 2014 +0200
Branches: master
https://developer.blender.org/rB7880f75e87ec5c1f7e7250f891a02e6566333d65

Cleanup: use bool

===================================================================

M	source/blender/editors/sculpt_paint/paint_cursor.c
M	source/blender/editors/sculpt_paint/sculpt.c

===================================================================

diff --git a/source/blender/editors/sculpt_paint/paint_cursor.c b/source/blender/editors/sculpt_paint/paint_cursor.c
index 7b9ede3..e27ef70 100644
--- a/source/blender/editors/sculpt_paint/paint_cursor.c
+++ b/source/blender/editors/sculpt_paint/paint_cursor.c
@@ -521,14 +521,15 @@ static int project_brush_radius(ViewContext *vc,
 	}
 }
 
-static int sculpt_get_brush_geometry(bContext *C, ViewContext *vc,
-                                     int x, int y, int *pixel_radius,
-                                     float location[3])
+static bool sculpt_get_brush_geometry(
+        bContext *C, ViewContext *vc,
+        int x, int y, int *pixel_radius,
+        float location[3])
 {
 	Scene *scene = CTX_data_scene(C);
 	Paint *paint = BKE_paint_get_active_from_context(C);
 	float mouse[2];
-	int hit;
+	bool hit;
 
 	mouse[0] = x;
 	mouse[1] = y;
@@ -1011,7 +1012,8 @@ static void paint_draw_cursor(bContext *C, int x, int y, void *UNUSED(unused))
 	 * special mode of drawing will go away */
 	if ((mode == PAINT_SCULPT) && vc.obact->sculpt) {
 		float location[3];
-		int pixel_radius, hit;
+		int pixel_radius;
+		bool hit;
 
 		/* test if brush is over the mesh */
 		hit = sculpt_get_brush_geometry(C, &vc, x, y, &pixel_radius, location);
diff --git a/source/blender/editors/sculpt_paint/sculpt.c b/source/blender/editors/sculpt_paint/sculpt.c
index defc7d7..766048d 100644
--- a/source/blender/editors/sculpt_paint/sculpt.c
+++ b/source/blender/editors/sculpt_paint/sculpt.c
@@ -4006,14 +4006,14 @@ static void sculpt_stroke_modifiers_check(const bContext *C, Object *ob)
 typedef struct {
 	SculptSession *ss;
 	const float *ray_start, *ray_normal;
-	int hit;
+	bool hit;
 	float dist;
 	int original;
 } SculptRaycastData;
 
 typedef struct {
 	const float *ray_start, *ray_normal;
-	int hit;
+	bool hit;
 	float dist;
 	float detail;
 } SculptDetailRaycastData;
@@ -4145,7 +4145,7 @@ static void sculpt_brush_init_tex(const Scene *scene, Sculpt *sd, SculptSession
 	sculpt_update_tex(scene, sd, ss);
 }
 
-static int sculpt_brush_stroke_init(bContext *C, wmOperator *op)
+static bool sculpt_brush_stroke_init(bContext *C, wmOperator *op)
 {
 	Scene *scene = CTX_data_scene(C);
 	Object *ob = CTX_data_active_object(C);




More information about the Bf-blender-cvs mailing list