[vtk-developers] const correctness

Berk Geveci berk.geveci at kitware.com
Thu Feb 10 12:50:49 EST 2011


Hi Tom,

Am I correct in assuming that almost every single subclass of VTK in other
projects will fail to compile after this change? Are there any other
backwards compatibility implications of this? Also, what are the advantages
of this change?

Also it doesn't look like you attempted to mark const functions as such. Was
that because it was too hard? This is probably a naive question because I
admit that I don't have a good grasp of constant functions. For example,
couldn't this function be const?

in vtkDataSet:
  virtual void GetCell(vtkIdType cellId, vtkGenericCell *cell) = 0;

This GetCell() does not change any data member of the dataset.

Best,
-berk



On Mon, Feb 7, 2011 at 5:56 PM, tom fogal <tfogal at sci.utah.edu> wrote:

> I have just pushed a new branch, `const-correctness', to my git repo:
>
>  git://shigeru.sci.utah.edu/vtk.git
>
> As you might guess, this makes VTK const correct.  Well, mostly.
>
> I had to fix the wrapper-parsing code a bit.  I've tested the python
> wrappings thus far.  They all use the same parser, right?  Anybody want
> to test / potentially fix up TCL and/or Java for me?  Should be easy,
> given that the Python stuff already works....
>
> I'll start rebasing against VTK master after this email.  This will get
> out of date fast (and thus be a pain to maintain), so I hope we can
> push it through soon.
>
> -tom
> _______________________________________________
> Powered by www.kitware.com
>
> Visit other Kitware open-source projects at
> http://www.kitware.com/opensource/opensource.html
>
> Follow this link to subscribe/unsubscribe:
> http://www.vtk.org/mailman/listinfo/vtk-developers
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://public.kitware.com/pipermail/vtk-developers/attachments/20110210/ebf95b4a/attachment.html>


More information about the vtk-developers mailing list