[osg-users] Please test SVN version of OpenSceneGraph

Williams, Blake bwilliams at drs-tcs.com
Wed Sep 12 08:53:32 PDT 2007



> -----Original Message-----
> From: osg-users-bounces at lists.openscenegraph.org [mailto:osg-users-
> bounces at lists.openscenegraph.org] On Behalf Of Andy Skinner
> Sent: Wednesday, September 12, 2007 10:07 AM
> To: OpenSceneGraph Users
> Subject: Re: [osg-users] Please test SVN version of OpenSceneGraph
...
> 
> An example log2 error I get is:
> S:\Amake\3p\derived\win32\openscenegraph\include\osg/Math(197) :
warning
> C4244: 'return' : conversion from 'const double' to 'float', possible
> loss of data
> 
> (this one seems to be when compiling src/osg/Material.cpp)
> 
> 
> andy

This warning is coming from the float version of the log2 declaration:

inline float log2(float v) { return static_cast<float>(log(v)) *
INVLN_2; }

Since INVLN_2 is a double, the warning appears.  INVLN_2 can either be
cast to a float or included in the parens for the static_cast.

Thanks,
Blake




More information about the osg-users mailing list