<div dir="ltr"><div class="gmail_extra"><div class="gmail_quote">On Fri, Jun 3, 2016 at 5:34 PM, SY Chen <span dir="ltr"><<a href="mailto:sychen52@gmail.com" target="_blank">sychen52@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><p dir="ltr">Does anyone know the reason why all the GetXXX functions in vtkPolyData class are not const?</p></blockquote><div>In the VTK code, all objects derived from vtkObjectBase are always accessed</div><div>though non-const pointers, and have only non-const methods.  Twenty-some</div><div>years ago when VTK began, the use of "const" was much less common than</div><div>it is now.  And compilers often had const-related bugs -- for example, MSVC</div><div>would often choke if "const" was used with templates.</div><div><br></div><div>Changing all these methods would be a huge task, especially considering</div><div>all of the other projects that use VTK and derive classes from VTK classes.</div><div>I think the general consensus is that, in terms of improving VTK code quality,</div><div>time would be better spent on chasing bugs and writing more unit tests for</div><div>VTK.</div><div><br></div><div>I'm sure this change will come eventually.</div><div><br></div><div> - David</div><div><br></div><div> </div></div></div></div>