[vtk-developers] vtkImageData

Jeff Lee jeff at cdnorthamerica.com
Tue Jun 5 08:57:48 EDT 2001


I have successfully compiled vtk with Metrowerks CodeWarrior.  In the
process, I had to fix many inconsistencies within vtk to get the
compiler to shut up.  One inconsistency which showed up in many places
was that arguments differed between member-function
prototypes(interface) and their corresponding implementation.  One
example is vtkImageData::GetDimensions(...).  The interface expects the
argument to be an integer array, and the implementation expects an
int*.  It is a mystery to me as to why other compilers don't complain
about this (probably an acceptable built-in conversion for most
compilers).  Anyhow, I think that it is good programming practice to
make the prototype match the implementation.  In the case of
vtkImageData::GetDimensions(...), everyone seems to be calling it with
an int*, not an integer array, so I changed
vtkImageData::GetDimensions(int dims[3]) to
vtkImageData::GetDimensions(int *dims).  If no-one objects, I will check
it and others like it into cvs.
-Jeff

--
J.A. Lee
Software Engineer
Computational Dynamics North America
3 Schoolhouse Lane
Etna NH, 03750
ph: 603-643-9993 x109, fax: 603-643-9994


-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.vtk.org/pipermail/vtk-developers/attachments/20010605/71a37aae/attachment.htm>


More information about the vtk-developers mailing list