I agree, this was probably a patch flub on my part when I merged in the features I was working on with the contributed ones that together made up 1.8->1.9 change to this file.<div><br clear="all">David E DeMarle<br>Kitware, Inc.<br>

R&D Engineer<br>21 Corporate Drive<br>Clifton Park, NY 12065-8662<br>Phone: 518-881-4909<br>
<br><br><div class="gmail_quote">On Fri, Dec 30, 2011 at 3:44 PM, David Gobbi <span dir="ltr"><<a href="mailto:david.gobbi@gmail.com">david.gobbi@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">

The more that I look at it, the more convinced I am that the outer loop<br>
is not even supposed to be there.<br>
<br>
 860         for (vtkIdType j = 0; j < input->GetNumberOfPoints(); j++)<br>
<br>
<a href="http://vtk.org/gitweb?p=VTK.git;a=blob;f=Graphics/vtkExtractSelectedIds.cxx;hb=ecbbf7f7#l860" target="_blank">http://vtk.org/gitweb?p=VTK.git;a=blob;f=Graphics/vtkExtractSelectedIds.cxx;hb=ecbbf7f7#l860</a><br>
<br>
Take a look at the commit where this line was added:<br>
<a href="http://vtk.org/gitweb?p=VTK.git;a=commitdiff;h=7030e24d#patch5" target="_blank">http://vtk.org/gitweb?p=VTK.git;a=commitdiff;h=7030e24d#patch5</a><br>
<br>
You have to scroll down some to see the line, but when this line was<br>
first added it was missing curly braces and it really looks as if the<br>
whole line is just a big typo.<br>
<br>
 - David<br>
<br>
<br>
On Fri, Dec 30, 2011 at 11:43 AM, Utkarsh Ayachit<br>
<div><div></div><div class="h5"><<a href="mailto:utkarsh.ayachit@kitware.com">utkarsh.ayachit@kitware.com</a>> wrote:<br>
> I can take a look at it. I'm sure I know what it should be doing, even<br>
> if not exactly how it's doing it.<br>
><br>
> Utkarsh<br>
><br>
> On Fri, Dec 30, 2011 at 1:24 PM, David Gobbi <<a href="mailto:david.gobbi@gmail.com">david.gobbi@gmail.com</a>> wrote:<br>
>> The tricky thing is that the re-used index is not the only problem.<br>
>> The outer loop is looping over all the points:<br>
>><br>
>>  872         for (vtkIdType j = 0; j < input->GetNumberOfPoints(); j++)<br>
>>  873           {<br>
>>  874           input->GetPointCells(ptId, ptCells);<br>
>><br>
>> So it seems that line 874 should use "j" instead of "ptId":<br>
>><br>
>>  874           input->GetPointCells(j, ptCells);<br>
>><br>
>> Unfortunately, I don't understand the code well enough...<br>
>> any suggestions?<br>
>><br>
>> I'm sure that multiple people have worked on this little block of code,<br>
>> because some loops use "j++" and some use "++j"  :)<br>
>><br>
>>  - David<br>
>><br>
>><br>
>> On Fri, Dec 30, 2011 at 11:12 AM, Bill Lorensen <<a href="mailto:bill.lorensen@gmail.com">bill.lorensen@gmail.com</a>> wrote:<br>
>>> Bad, bad, really bad. Nice catch.<br>
>>><br>
>>> On Fri, Dec 30, 2011 at 1:04 PM, David Gobbi <<a href="mailto:david.gobbi@gmail.com">david.gobbi@gmail.com</a>> wrote:<br>
>>>> Hi Utkarsh,<br>
>>>><br>
>>>> I think that I might have found a bug in that class.  At line 880,<br>
>>>> the "j" is used as a for-loop index even though it was already<br>
>>>> used in the enclosing for-loop:<br>
>>>><br>
>>>> <a href="http://vtk.org/gitweb?p=VTK.git;a=blob;f=Graphics/vtkExtractSelectedIds.cxx;h=0d45ffc7#l870" target="_blank">http://vtk.org/gitweb?p=VTK.git;a=blob;f=Graphics/vtkExtractSelectedIds.cxx;h=0d45ffc7#l870</a><br>


>>>><br>
>>>> Can you take a look?<br>
>>>><br>
>>>>  - David<br>
>>>><br>
>>>><br>
>>>> On Fri, Dec 30, 2011 at 10:23 AM, Utkarsh Ayachit<br>
>>>> <<a href="mailto:utkarsh.ayachit@kitware.com">utkarsh.ayachit@kitware.com</a>> wrote:<br>
>>>>> That sounds great to me. Thanks.<br>
>>>>><br>
>>>>> Utkarsh<br>
>>>>><br>
>>>>> On Fri, Dec 30, 2011 at 11:13 AM, David Gobbi <<a href="mailto:david.gobbi@gmail.com">david.gobbi@gmail.com</a>> wrote:<br>
>>>>>> On Fri, Dec 30, 2011 at 9:02 AM, David Doria <<a href="mailto:daviddoria@gmail.com">daviddoria@gmail.com</a>> wrote:<br>
>>>>>>> On Fri, Dec 30, 2011 at 10:26 AM, David Gobbi <<a href="mailto:david.gobbi@gmail.com">david.gobbi@gmail.com</a>> wrote:<br>
>>>>>>>> The only way to avoid shadow warnings is to use a new name<br>
>>>>>>><br>
>>>>>>> The name VTK_TT is used inside the macro, so I don't think there is an<br>
>>>>>>> easy way to change it in the second call. Anyone have a "quick fix" we<br>
>>>>>>> can apply now to fix the warning, and then we can put the proposed<br>
>>>>>>> rewrite on the todo list?<br>
>>>>>><br>
>>>>>> My proposed rewrite is fairly straightforward.  Since it was on my mind,<br>
>>>>>> I've already gotten started on it, and will submit it to gerrit soon.<br>
>>>>>><br>
>>>>>>  - David<br>
>>>>>> _______________________________________________<br>
>>>>>> Powered by <a href="http://www.kitware.com" target="_blank">www.kitware.com</a><br>
>>>>>><br>
>>>>>> Visit other Kitware open-source projects at <a href="http://www.kitware.com/opensource/opensource.html" target="_blank">http://www.kitware.com/opensource/opensource.html</a><br>
>>>>>><br>
>>>>>> Follow this link to subscribe/unsubscribe:<br>
>>>>>> <a href="http://www.vtk.org/mailman/listinfo/vtk-developers" target="_blank">http://www.vtk.org/mailman/listinfo/vtk-developers</a><br>
>>>>>><br>
>>>> _______________________________________________<br>
>>>> Powered by <a href="http://www.kitware.com" target="_blank">www.kitware.com</a><br>
>>>><br>
>>>> Visit other Kitware open-source projects at <a href="http://www.kitware.com/opensource/opensource.html" target="_blank">http://www.kitware.com/opensource/opensource.html</a><br>
>>>><br>
>>>> Follow this link to subscribe/unsubscribe:<br>
>>>> <a href="http://www.vtk.org/mailman/listinfo/vtk-developers" target="_blank">http://www.vtk.org/mailman/listinfo/vtk-developers</a><br>
>>>><br>
>>><br>
>>><br>
>>><br>
>>> --<br>
>>> Unpaid intern in BillsBasement at noware dot com<br>
_______________________________________________<br>
Powered by <a href="http://www.kitware.com" target="_blank">www.kitware.com</a><br>
<br>
Visit other Kitware open-source projects at <a href="http://www.kitware.com/opensource/opensource.html" target="_blank">http://www.kitware.com/opensource/opensource.html</a><br>
<br>
Follow this link to subscribe/unsubscribe:<br>
<a href="http://www.vtk.org/mailman/listinfo/vtk-developers" target="_blank">http://www.vtk.org/mailman/listinfo/vtk-developers</a><br>
<br>
</div></div></blockquote></div><br></div>