[vtk-developers] What is vtkFloatingPointType?

David Gobbi david.gobbi at gmail.com
Wed Nov 7 16:28:13 EST 2012


On Wed, Nov 7, 2012 at 1:56 PM, Sean McBride <sean at rogue-research.com> wrote:
> Hi all,
>
> grepping VTK master for "vtkFloatingPointType" finds just 19 occurrences in just 5 files, including vtkType.h:272:
>
> #define vtkFloatingPointType vtkFloatingPointType
>
> which clang warns about:
>
> warning: disabled expansion of recursive macro [-Wdisabled-macro-expansion]
>
> I suspect vtkFloatingPointType is leftover crud?  It seems if we just change vtkDiscreteMarchingCubes.cxx to use float directly, vtkFloatingPointType is not needed at all?

It's leftover cruft to allow compatibility between VTK 4.2 and VTK
4.4.  It has been irrelevant since the release of VTK 5.0.  Anywhere
that it occurs (except for vtkType.h) it should be replaced with
"double".

As for the "#define vtkFloatingPointType vtkFloatingPointType", it
serves the purpose of allowing people to do this:

#ifdef vtkFloatingPointType

I'd imagine that there are a few (old) third-party packages that use
this ifdef.

 - David



More information about the vtk-developers mailing list