[Bf-blender-cvs] SVN commit: /data/svn/bf-blender [46243] trunk/blender/source/blender/ editors/sculpt_paint/sculpt.c: fix for last commit, ( warning was without openmp only)

Campbell Barton ideasman42 at gmail.com
Thu May 3 22:26:05 CEST 2012


Revision: 46243
          http://projects.blender.org/scm/viewvc.php?view=rev&root=bf-blender&revision=46243
Author:   campbellbarton
Date:     2012-05-03 20:26:05 +0000 (Thu, 03 May 2012)
Log Message:
-----------
fix for last commit, (warning was without openmp only)

Modified Paths:
--------------
    trunk/blender/source/blender/editors/sculpt_paint/sculpt.c

Modified: trunk/blender/source/blender/editors/sculpt_paint/sculpt.c
===================================================================
--- trunk/blender/source/blender/editors/sculpt_paint/sculpt.c	2012-05-03 20:19:42 UTC (rev 46242)
+++ trunk/blender/source/blender/editors/sculpt_paint/sculpt.c	2012-05-03 20:26:05 UTC (rev 46243)
@@ -267,7 +267,7 @@
 
 /*** paint mesh ***/
 
-static void paint_mesh_restore_co(SculptSession *ss)
+static void paint_mesh_restore_co(Sculpt *sd, SculptSession *ss)
 {
 	StrokeCache *cache = ss->cache;
 	int i;
@@ -275,6 +275,10 @@
 	PBVHNode **nodes;
 	int n, totnode;
 
+#ifndef _OPENMP
+	(void)sd; /* quied unused warning */
+#endif
+
 	BLI_pbvh_search_gather(ss->pbvh, NULL, NULL, &nodes, &totnode);
 
 	#pragma omp parallel for schedule(guided) if (sd->flags & SCULPT_USE_OPENMP)
@@ -421,11 +425,11 @@
 	local_co[2] = fabs(local_co[2]);
 
 	if (local_co[0] <= side && local_co[1] <= side && local_co[2] <= side) {
-		float p = 4;
+		float p = 4.0f;
 		
 		test->dist = ((powf(local_co[0], p) +
 		               powf(local_co[1], p) +
-		               powf(local_co[2], p)) / pow(side, p));
+		               powf(local_co[2], p)) / powf(side, p));
 
 		return 1;
 	}
@@ -3373,7 +3377,7 @@
 	     brush_use_size_pressure(ss->cache->vc->scene, brush)) ||
 	    (brush->flag & BRUSH_RESTORE_MESH))
 	{
-		paint_mesh_restore_co(ss);
+		paint_mesh_restore_co(sd, ss);
 	}
 }
 
@@ -3592,7 +3596,7 @@
 	Sculpt *sd = CTX_data_tool_settings(C)->sculpt;
 
 	if (ss->cache) {
-		paint_mesh_restore_co(ss);
+		paint_mesh_restore_co(sd, ss);
 	}
 
 	paint_stroke_cancel(C, op);




More information about the Bf-blender-cvs mailing list