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>2013-09-02 00:17:56 +0400
committerCampbell Barton <ideasman42@gmail.com>2013-09-02 00:17:56 +0400
commit36065ee4f4a729ab48df5388373c26b07554de67 (patch)
treeea5abc0de5357a1e49120a139ef2f62270bc0bd3 /source/blender/blenkernel/intern/dynamicpaint.c
parent77e86dce2aa868f96467b1989f905cf9cb20de02 (diff)
use strict flags for kdtree, and replace ints with unsigned ints where possible.
also replace callocs with mallocs since zeroing memory can be avoided.
Diffstat (limited to 'source/blender/blenkernel/intern/dynamicpaint.c')
-rw-r--r--source/blender/blenkernel/intern/dynamicpaint.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/source/blender/blenkernel/intern/dynamicpaint.c b/source/blender/blenkernel/intern/dynamicpaint.c
index a62ca530bf9..a6cff9f20fb 100644
--- a/source/blender/blenkernel/intern/dynamicpaint.c
+++ b/source/blender/blenkernel/intern/dynamicpaint.c
@@ -3802,14 +3802,15 @@ static int dynamicPaint_paintParticles(DynamicPaintSurface *surface,
*/
KDTreeNearest *nearest;
- int n, particles = 0;
+ int n, particles;
float smooth_range = smooth * (1.0f - strength), dist;
/* calculate max range that can have particles with higher influence than the nearest one */
float max_range = smooth - strength * smooth + solidradius;
/* Make gcc happy! */
dist = max_range;
- particles = BLI_kdtree_range_search(tree, max_range, bData->realCoord[bData->s_pos[index]].v, NULL, &nearest);
+ particles = BLI_kdtree_range_search(tree, bData->realCoord[bData->s_pos[index]].v, NULL,
+ &nearest, max_range);
/* Find particle that produces highest influence */
for (n = 0; n < particles; n++) {