diff --git a/include/osg/BoundingSphere b/include/osg/BoundingSphere index 239476cbf..b24a011ff 100644 --- a/include/osg/BoundingSphere +++ b/include/osg/BoundingSphere @@ -35,7 +35,7 @@ class BoundingSphereImpl { public: typedef VT vec_type; - typedef typename vec_type::value_type value_type; + typedef typename VT::value_type value_type; vec_type _center; value_type _radius; diff --git a/include/osg/Vec2b b/include/osg/Vec2b index ad7251fc8..489273b73 100644 --- a/include/osg/Vec2b +++ b/include/osg/Vec2b @@ -29,7 +29,7 @@ class Vec2b // Methods are defined here so that they are implicitly inlined /** Type of Vec class.*/ - typedef char value_type; + typedef signed char value_type; /** Number of vector components. */ enum { num_components = 2 }; @@ -39,7 +39,7 @@ class Vec2b Vec2b() { _v[0]=0; _v[1]=0; } - Vec2b(char r, char g) + Vec2b(value_type r, value_type g) { _v[0]=r; _v[1]=g; } @@ -94,8 +94,8 @@ class Vec2b /** Unary multiply by scalar. */ inline Vec2b& operator *= (float rhs) { - _v[0]=(char)((float)_v[0]*rhs); - _v[1]=(char)((float)_v[1]*rhs); + _v[0]=(value_type)((float)_v[0]*rhs); + _v[1]=(value_type)((float)_v[1]*rhs); return *this; } diff --git a/include/osg/Vec3b b/include/osg/Vec3b index d54332ca8..64fb53ba0 100644 --- a/include/osg/Vec3b +++ b/include/osg/Vec3b @@ -27,7 +27,7 @@ class Vec3b public: /** Type of Vec class.*/ - typedef char value_type; + typedef signed char value_type; /** Number of vector components. */ enum { num_components = 3 }; @@ -94,9 +94,9 @@ class Vec3b /** Unary multiply by scalar. */ inline Vec3b& operator *= (float rhs) { - _v[0]=(char)((float)_v[0]*rhs); - _v[1]=(char)((float)_v[1]*rhs); - _v[2]=(char)((float)_v[2]*rhs); + _v[0]=(value_type)((float)_v[0]*rhs); + _v[1]=(value_type)((float)_v[1]*rhs); + _v[2]=(value_type)((float)_v[2]*rhs); return *this; } diff --git a/include/osg/Vec4b b/include/osg/Vec4b index e7afb3258..2c8a9fffd 100644 --- a/include/osg/Vec4b +++ b/include/osg/Vec4b @@ -27,7 +27,7 @@ class Vec4b public: /** Type of Vec class.*/ - typedef char value_type; + typedef signed char value_type; /** Number of vector components. */ enum { num_components = 4 }; @@ -101,10 +101,10 @@ class Vec4b /** Unary multiply by scalar. */ inline Vec4b& operator *= (float rhs) { - _v[0]=(char)((float)_v[0]*rhs); - _v[1]=(char)((float)_v[1]*rhs); - _v[2]=(char)((float)_v[2]*rhs); - _v[3]=(char)((float)_v[3]*rhs); + _v[0]=(value_type)((float)_v[0]*rhs); + _v[1]=(value_type)((float)_v[1]*rhs); + _v[2]=(value_type)((float)_v[2]*rhs); + _v[3]=(value_type)((float)_v[3]*rhs); return *this; } diff --git a/include/osg/Vec4ub b/include/osg/Vec4ub index a6ef9bcc6..9d6467a80 100644 --- a/include/osg/Vec4ub +++ b/include/osg/Vec4ub @@ -62,26 +62,26 @@ class Vec4ub else return (_v[3]