solved an issue where if dim was < 16 the data would not get copied for the float versions of insert and nearest*
This closes bugs: #3 #4 #9 git-svn-id: http://kdtree.googlecode.com/svn/trunk@30 58b2c0e6-ac2f-0410-a5b6-b51bcff41737
This commit is contained in:
parent
0a5ee0c04f
commit
176ca28697
1 changed files with 3 additions and 3 deletions
6
kdtree.c
6
kdtree.c
|
@ -219,7 +219,7 @@ int kd_insertf(struct kdtree *tree, const float *pos, void *data)
|
|||
return -1;
|
||||
}
|
||||
} else {
|
||||
bptr = sbuf;
|
||||
bptr = buf = sbuf;
|
||||
}
|
||||
|
||||
while(dim-- > 0) {
|
||||
|
@ -468,7 +468,7 @@ struct kdres *kd_nearestf(struct kdtree *tree, const float *pos)
|
|||
return 0;
|
||||
}
|
||||
} else {
|
||||
bptr = sbuf;
|
||||
bptr = buf = sbuf;
|
||||
}
|
||||
|
||||
while(dim-- > 0) {
|
||||
|
@ -570,7 +570,7 @@ struct kdres *kd_nearest_rangef(struct kdtree *kd, const float *pos, float range
|
|||
return 0;
|
||||
}
|
||||
} else {
|
||||
bptr = sbuf;
|
||||
bptr = buf = sbuf;
|
||||
}
|
||||
|
||||
while(dim-- > 0) {
|
||||
|
|
Loading…
Reference in a new issue