[vtk-developers] compiler warnings, float vs double
David Cole
david.cole at kitware.com
Wed Aug 1 13:16:27 EDT 2007
You are trying to eliminate warnings, so just change the constants to the
correct type to match the methods. That is a no-op as far as everybody else
is concerned.
If you change the signatures of methods unnecessarily, others may have to
change their client code to keep pace. (For some clients and some methods
this may be a *huge* amount of work.) If there were a "*better*" reason to
change the signature, I'd say open it up for discussion, but not just to
eliminate warnings.
Change the constants unless some other people speak up and disagree with
me....
:-)
David Cole
On 8/1/07, Sean McBride <sean at rogue-research.com> wrote:
>
> Hi all,
>
> I'd like to fix a few compiler warnings related to implicit 64 to 32 bit
> conversion. For example in vtkRenderWindow.h:
>
> vtkSetClampMacro(AnaglyphColorSaturation,float, 0.0, 1.0);
> vtkGetMacro(AnaglyphColorSaturation,float);
>
> the variable is float but the constants are double.
>
> I could: 1) change the float to double 2) change the consts to 0.0f,
> 1.0f. I seem to remember that in VTK 5 there was a big float->double
> change. So is solution 1 preferred?
>
> Thanks,
>
> --
> ____________________________________________________________
> Sean McBride, B. Eng sean at rogue-research.com
> Rogue Research www.rogue-research.com
> Mac Software Developer Montréal, Québec, Canada
>
>
> _______________________________________________
> vtk-developers mailing list
> vtk-developers at vtk.org
> http://www.vtk.org/mailman/listinfo/vtk-developers
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://public.kitware.com/pipermail/vtk-developers/attachments/20070801/6c0bcbb8/attachment.html>
More information about the vtk-developers
mailing list