<html>
<head>
<meta content="text/html; charset=ISO-8859-1"
http-equiv="Content-Type">
</head>
<body text="#000000" bgcolor="#FFFFFF">
Am 2013-09-12 14:50, schrieb Frederic Da Vitoria:<br>
<blockquote
cite="mid:CANe_y9TpMD-Y1PVqcZ9s35tGqNEk=M938QnyAJZmbxy+9Dhbeg@mail.gmail.com"
type="cite">
<div dir="ltr">
<div class="gmail_extra">
<div class="gmail_quote"><br>
<blockquote class="gmail_quote" style="margin:0 0 0
.8ex;border-left:1px #ccc solid;padding-left:1ex">
Can someone explain what the line<br>
if VST.AbsoluteIndex(XNode) > -1 then<br>
actually means?<br>
</blockquote>
</div>
<br>
</div>
<div class="gmail_extra">I didn't look at the code, but usually
index = -1 means that the item was not found. So maybe
AbsoluteIndex's result should actually be signed? </div>
</div>
</blockquote>
<br>
And how would it ever reach the value -1? <br>
Obviously there is no code that sets it to this value, <br>
otherwise it would not compile with Cardinal type.<br>
<br>
<br>
<blockquote
cite="mid:CANe_y9TpMD-Y1PVqcZ9s35tGqNEk=M938QnyAJZmbxy+9Dhbeg@mail.gmail.com"
type="cite">
<div dir="ltr">
<div class="gmail_extra">In this example, I guess the test is to
avoid a bug if AddChild does not manage to insert the root
node. I don't know if AddChild could create a node without
inserting, but this is what the code seems to be testing.<br
clear="all">
</div>
<div class="gmail_extra"><br>
</div>
</div>
</blockquote>
But it is a useless "if" statement that doesn't test anything.<br>
<br>
</body>
</html>