From 7ef8b14bf09eb0bd2d965f9781f68b5a1eedc921 Mon Sep 17 00:00:00 2001 From: Robert Osfield Date: Fri, 9 Jul 2004 15:41:50 +0000 Subject: [PATCH] VS.NET Warning fixes from Stephane --- include/osg/Vec2d | 4 ++-- include/osg/Vec3d | 4 ++-- include/osg/Vec4d | 4 ++-- 3 files changed, 6 insertions(+), 6 deletions(-) diff --git a/include/osg/Vec2d b/include/osg/Vec2d index 5af0edc94..121180019 100644 --- a/include/osg/Vec2d +++ b/include/osg/Vec2d @@ -40,7 +40,7 @@ class Vec2d inline Vec2d(const Vec2f& vec) { _v[0]=vec._v[0]; _v[1]=vec._v[1]; } - inline operator Vec2f() const { return Vec2f(_v[0],_v[1]);} + inline operator Vec2f() const { return Vec2f(static_cast(_v[0]),static_cast(_v[1]));} inline bool operator == (const Vec2d& v) const { return _v[0]==v._v[0] && _v[1]==v._v[1]; } @@ -143,7 +143,7 @@ class Vec2d /// Length of the vector = sqrt( vec . vec ) inline value_type length() const { - return sqrtf( _v[0]*_v[0] + _v[1]*_v[1] ); + return sqrt( _v[0]*_v[0] + _v[1]*_v[1] ); } /// Length squared of the vector = vec . vec diff --git a/include/osg/Vec3d b/include/osg/Vec3d index e3198a900..135f81911 100644 --- a/include/osg/Vec3d +++ b/include/osg/Vec3d @@ -38,7 +38,7 @@ class Vec3d inline Vec3d(const Vec3f& vec) { _v[0]=vec._v[0]; _v[1]=vec._v[1]; _v[2]=vec._v[2];} - inline operator Vec3f() const { return Vec3f((float)_v[0],(float)_v[1],(float)_v[2]);} + inline operator Vec3f() const { return Vec3f(static_cast(_v[0]),static_cast(_v[1]),static_cast(_v[2]));} Vec3d(value_type x,value_type y,value_type z) { _v[0]=x; _v[1]=y; _v[2]=z; } @@ -166,7 +166,7 @@ class Vec3d /// Length of the vector = sqrt( vec . vec ) inline value_type length() const { - return sqrtf( _v[0]*_v[0] + _v[1]*_v[1] + _v[2]*_v[2] ); + return sqrt( _v[0]*_v[0] + _v[1]*_v[1] + _v[2]*_v[2] ); } /// Length squared of the vector = vec . vec diff --git a/include/osg/Vec4d b/include/osg/Vec4d index 7dc973d6b..64ea48c8f 100644 --- a/include/osg/Vec4d +++ b/include/osg/Vec4d @@ -55,7 +55,7 @@ class Vec4d inline Vec4d(const Vec4f& vec) { _v[0]=vec._v[0]; _v[1]=vec._v[1]; _v[2]=vec._v[2]; _v[3]=vec._v[3];} - inline operator Vec4f() const { return Vec4f((float)_v[0],(float)_v[1],(float)_v[2],(float)_v[3]);} + inline operator Vec4f() const { return Vec4f(static_cast(_v[0]),static_cast(_v[1]),static_cast(_v[2]),static_cast(_v[3]));} inline bool operator == (const Vec4d& v) const { return _v[0]==v._v[0] && _v[1]==v._v[1] && _v[2]==v._v[2] && _v[3]==v._v[3]; } @@ -198,7 +198,7 @@ class Vec4d /// Length of the vector = sqrt( vec . vec ) inline value_type length() const { - return sqrtf( _v[0]*_v[0] + _v[1]*_v[1] + _v[2]*_v[2] + _v[3]*_v[3]); + return sqrt( _v[0]*_v[0] + _v[1]*_v[1] + _v[2]*_v[2] + _v[3]*_v[3]); } /// Length squared of the vector = vec . vec