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:
jtsiomb 2011-11-25 00:04:54 +00:00
parent 0a5ee0c04f
commit 176ca28697

View file

@ -219,7 +219,7 @@ int kd_insertf(struct kdtree *tree, const float *pos, void *data)
return -1; return -1;
} }
} else { } else {
bptr = sbuf; bptr = buf = sbuf;
} }
while(dim-- > 0) { while(dim-- > 0) {
@ -468,7 +468,7 @@ struct kdres *kd_nearestf(struct kdtree *tree, const float *pos)
return 0; return 0;
} }
} else { } else {
bptr = sbuf; bptr = buf = sbuf;
} }
while(dim-- > 0) { while(dim-- > 0) {
@ -570,7 +570,7 @@ struct kdres *kd_nearest_rangef(struct kdtree *kd, const float *pos, float range
return 0; return 0;
} }
} else { } else {
bptr = sbuf; bptr = buf = sbuf;
} }
while(dim-- > 0) { while(dim-- > 0) {