[vtk-developers] What is vtkFloatingPointType?
David Cole
david.cole at kitware.com
Wed Nov 7 16:35:14 EST 2012
On Wed, Nov 7, 2012 at 4:28 PM, David Gobbi <david.gobbi at gmail.com> wrote:
> 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
> _______________________________________________
> 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
>
If it needs to be kept, we could at least just:
#define vtkFloatingPointType double
and remove the typedef, couldn't we?
That would get rid of the clang warning. It's a little surprising (to
me, at least) to see a symbol name that is both a typedef and a
#define...
More information about the vtk-developers
mailing list