Thanks, I've added a test for it in my bugfixes branch and added it to the bug tracker.<br><br><div class="gmail_quote">2008/11/13 Antibyte Scoopex <span dir="ltr"><<a href="mailto:antibyte@gmail.com">antibyte@gmail.com</a>></span><br>
<blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">Hi Paul,<br><br>I have cast from size_t to int (instead of unsigned int) whereever to compiler told me to. I don't know if this makes any different impact on libkdtree than casting all to unsigned.<br>
<br>An other issue I found using test_kdtree.cpp is this:<br>
When I run it in release mode the first line of output is:<br>meta node: 0x00335ec0 (0,0,0); parent: 0000000000; ...<br><br>However in debug mode I get:<br>meta node: 0x00336c08 (-842150451,-842150451,-842150451); parent: 0000000000; ...<br>
<br>-842150451 = 0xcdcdcdcd which is used by Microsoft's C++ debugging runtime library to mark uninitialised heap memory. The rest of the output is identical. While uninitialized data might not be a problem for libkdtree itself, I can see the possiblity of using libkdtree in an erranous manner and then have release and debug builds that do not correspond to each other. Just a thought.<br>
<br>I'm starting to get into using libkdtree, and greatly support Sam Haynes proposal for a minimanual for beginners. :)<br><br>Best regards,<br>Antti.<br><br><br><div class="gmail_quote">2008/11/13 Paul Harris <span dir="ltr"><<a href="mailto:harris.pc@gmail.com" target="_blank">harris.pc@gmail.com</a>></span><div>
<div></div><div class="Wj3C7c"><br>
<blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">i turned on the "detect 64 bit problems" and saw the errors!<br><br>I've converted them all to unsigned ints. i'm not sure if that was the right thing to do, i'll ask around about it.<br>
<br>static casts are good, except they dont detect errors like converting -1 to an unsigned int. check out boost::numeric_cast for that<br>
<br>keep going with C++, i love it more than other languages as it helps you find more bugs without even running the program...<div><div></div><div><br><br><div class="gmail_quote">2008/11/13 Paul Harris <span dir="ltr"><<a href="mailto:paulharris@computer.org" target="_blank">paulharris@computer.org</a>></span><br>
<blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">I didn't see those warnings, what compiler flags are you using?<br>Can you please send me your adjusted kdtree files?<br>
<br>thanks,<br>Paul<br><br><div class="gmail_quote">2008/11/13 Antibyte Scoopex <span dir="ltr"><<a href="mailto:antibyte@gmail.com" target="_blank">antibyte@gmail.com</a>></span><div><div></div><div>
<br>
<blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">Hello Paul,<br><br>thank you very much for your help!<br><br>You fixed all the errors. The examples/test_kdtree.cpp seems to work as intended.<br>
<br>Using Visual Studio 2005 there are only some warnings left, all of them about implicitly converting 'size_t' to 'int'/'unsigned int'.<br>
<br>I fixed those with static_casts and it compiles totally clean now. I hope I didn't break anything by that, because these STL-like templates intimidate me a bit. :)<br><br>Thanks again!<br>Best regards,<br>Antti.<div>
<div></div><div><br>
<br><br><div class="gmail_quote">2008/11/13 Paul Harris <span dir="ltr"><<a href="mailto:paulharris@computer.org" target="_blank">paulharris@computer.org</a>></span><br><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
Hi again,<br><br>Could you please tell me if this fixes all of your compiler errors... and if not please send me the compile output.<br><br>Please confirm receipt, sometimes zip files get stuck in spam filters...<br><br>
thanks,<br>
Paul<br><br><br><div class="gmail_quote">2008/11/13 Paul Harris <span dir="ltr"><<a href="mailto:paulharris@computer.org" target="_blank">paulharris@computer.org</a>></span><div><div></div><div><br><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
Hi Antibyte (love the name),<br><br>Thats on the hit-list to fix, could you please send the output, it may come in handy :)<br><br>thanks,<br>Paul<br><br><div class="gmail_quote">2008/11/12 Antibyte Scoopex <span dir="ltr"><<a href="mailto:antibyte@gmail.com" target="_blank">antibyte@gmail.com</a>></span><br>
<blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;"><div><div></div><div>Hi,<br><br>I would really like to use libkdtree++, however I am too dumb to compile it under Visual Studio 2005 w/ SP1.<br>
It throws numerous warnings and errors. If you want I can send the output.<br><br>Help would be appreciated.<br>
<br>Best regards,<br>Antti.<br><br>
<br></div></div>_______________________________________________<br>
libkdtree-devel mailing list<br>
<a href="mailto:libkdtree-devel@lists.alioth.debian.org" target="_blank">libkdtree-devel@lists.alioth.debian.org</a><br>
<a href="http://lists.alioth.debian.org/mailman/listinfo/libkdtree-devel" target="_blank">http://lists.alioth.debian.org/mailman/listinfo/libkdtree-devel</a><br>
<br></blockquote></div><br>
</blockquote></div></div></div><br>
</blockquote></div><br>
</div></div></blockquote></div></div></div><br>
</blockquote></div><br>
</div></div></blockquote></div></div></div><br>
</blockquote></div><br>