diff options
author | Brecht Van Lommel <brechtvanlommel@pandora.be> | 2010-02-08 16:55:31 +0300 |
---|---|---|
committer | Brecht Van Lommel <brechtvanlommel@pandora.be> | 2010-02-08 16:55:31 +0300 |
commit | ec7df03c867d28316708e9b91bec5cef0aee832e (patch) | |
tree | 3f560939b745032e235d9ac789c4117d669d6462 /source/blender/blenlib/intern/BLI_kdopbvh.c | |
parent | 4c318539b2f6abdf8f2a02376b6fcb8d30a4b12e (diff) |
Warning fixes, one actual bug found in sequencer sound wave drawing. Also
changed some malloc to MEM_mallocN while trying to track down a memory leak.
Diffstat (limited to 'source/blender/blenlib/intern/BLI_kdopbvh.c')
-rw-r--r-- | source/blender/blenlib/intern/BLI_kdopbvh.c | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/source/blender/blenlib/intern/BLI_kdopbvh.c b/source/blender/blenlib/intern/BLI_kdopbvh.c index a91c24471bb..39f6e7a8aba 100644 --- a/source/blender/blenlib/intern/BLI_kdopbvh.c +++ b/source/blender/blenlib/intern/BLI_kdopbvh.c @@ -196,14 +196,14 @@ int ADJUST_MEMORY(void *local_memblock, void **memblock, int new_size, int *max_ // http://ralphunden.net/content/tutorials/a-guide-to-introsort/ // and he derived it from the SUN STL ////////////////////////////////////////////////////////////////////////////////////////////////////// -static int size_threshold = 16; +//static int size_threshold = 16; /* * Common methods for all algorithms */ -static int floor_lg(int a) +/*static int floor_lg(int a) { return (int)(floor(log(a)/log(2))); -} +}*/ /* * Insertion sort algorithm @@ -243,6 +243,7 @@ static int bvh_partition(BVHNode **a, int lo, int hi, BVHNode * x, int axis) /* * Heapsort algorithm */ +#if 0 static void bvh_downheap(BVHNode **a, int i, int n, int lo, int axis) { BVHNode * d = a[lo+i-1]; @@ -274,6 +275,7 @@ static void bvh_heapsort(BVHNode **a, int lo, int hi, int axis) bvh_downheap(a, 1,i-1,lo, axis); } } +#endif static BVHNode *bvh_medianof3(BVHNode **a, int lo, int mid, int hi, int axis) // returns Sortable { |