diff options
author | Campbell Barton <ideasman42@gmail.com> | 2013-09-02 00:17:56 +0400 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2013-09-02 00:17:56 +0400 |
commit | 36065ee4f4a729ab48df5388373c26b07554de67 (patch) | |
tree | ea5abc0de5357a1e49120a139ef2f62270bc0bd3 /source/blender/editors/physics/particle_edit.c | |
parent | 77e86dce2aa868f96467b1989f905cf9cb20de02 (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/editors/physics/particle_edit.c')
-rw-r--r-- | source/blender/editors/physics/particle_edit.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/source/blender/editors/physics/particle_edit.c b/source/blender/editors/physics/particle_edit.c index dc7ec16d7c1..1a561efd217 100644 --- a/source/blender/editors/physics/particle_edit.c +++ b/source/blender/editors/physics/particle_edit.c @@ -2453,7 +2453,7 @@ static int remove_doubles_exec(bContext *C, wmOperator *op) copy_v3_v3(co, point->keys->co); mul_m4_v3(mat, co); - totn= BLI_kdtree_find_n_nearest(tree, 10, co, NULL, nearest); + totn = BLI_kdtree_find_nearest_n(tree, co, NULL, nearest, 10); for (n=0; n<totn; n++) { /* this needs a custom threshold still */ @@ -3459,7 +3459,7 @@ static int brush_add(PEData *data, short number) float maxd, totw=0.0, weight[3]; psys_particle_on_dm(psmd->dm, psys->part->from, pa->num, pa->num_dmcache, pa->fuv, pa->foffset, co1, 0, 0, 0, 0, 0); - maxw= BLI_kdtree_find_n_nearest(tree, 3, co1, NULL, ptn); + maxw = BLI_kdtree_find_nearest_n(tree, co1, NULL, ptn, 3); maxd= ptn[maxw-1].dist; |