[vtk-developers] Adding const to public API?

David Gobbi david.gobbi at gmail.com
Wed Sep 22 14:07:03 EDT 2010


On Wed, Sep 22, 2010 at 11:34 AM, Sean McBride <sean at rogue-research.com> wrote:
> Hi all,
>
> Would it break any compatibility or cause any problems with wrapping if
> I add a 'const' to a parameter of a public API?
>
> Specifically:
> void vtkImplicitFunction::SetTransform(double elements[16])

As long as there are no subclasses around that override that
signature, I don't think that this change can break anything.  So I
say go for it.

Way back in 1999 most of the Set methods with "char *" parameters were
changed to "const char *".  I kinda wish that all the Set array
parameters had been made const at the same time.

  David



More information about the vtk-developers mailing list