diff options
author | Campbell Barton <ideasman42@gmail.com> | 2011-02-13 13:52:18 +0300 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2011-02-13 13:52:18 +0300 |
commit | 0955c664aa7c5fc5f0bd345c58219c40f04ab9c1 (patch) | |
tree | 20b6a2ab2e1130d75d119eba09f3b195a33a9434 /source/blender/blenlib/intern/BLI_kdtree.c | |
parent | f3bd89b1b7a86778ff4c633a6b4115309a1b3c7e (diff) |
fix for warnings from Sparse static source code checker, mostly BKE/BLI and python functions.
- use NULL rather then 0 where possible (makes code & function calls more readable IMHO).
- set static variables and functions (exposed some unused vars/funcs).
- use func(void) rather then func() for definitions.
Diffstat (limited to 'source/blender/blenlib/intern/BLI_kdtree.c')
-rw-r--r-- | source/blender/blenlib/intern/BLI_kdtree.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/source/blender/blenlib/intern/BLI_kdtree.c b/source/blender/blenlib/intern/BLI_kdtree.c index 0d541c1fe37..8902c580493 100644 --- a/source/blender/blenlib/intern/BLI_kdtree.c +++ b/source/blender/blenlib/intern/BLI_kdtree.c @@ -255,7 +255,7 @@ static void add_nearest(KDTreeNearest *ptn, int *found, int n, int index, float /* finds the nearest n entries in tree to specified coordinates */ int BLI_kdtree_find_n_nearest(KDTree *tree, int n, float *co, float *nor, KDTreeNearest *nearest) { - KDTreeNode *root, *node=0; + KDTreeNode *root, *node= NULL; KDTreeNode **stack, *defaultstack[100]; float cur_dist; int i, totstack, cur=0, found=0; @@ -370,7 +370,7 @@ static void add_in_range(KDTreeNearest **ptn, int found, int *totfoundstack, int } int BLI_kdtree_range_search(KDTree *tree, float range, float *co, float *nor, KDTreeNearest **nearest) { - KDTreeNode *root, *node=0; + KDTreeNode *root, *node= NULL; KDTreeNode **stack, *defaultstack[100]; KDTreeNearest *foundstack=NULL; float range2 = range*range, dist2; |