From 3b15d3a8dff659725d6c90df285993737a71c529 Mon Sep 17 00:00:00 2001 From: dibenedetto Date: Tue, 30 Jun 2009 19:01:22 +0000 Subject: [PATCH] added cast to unsigned char. --- vcg/space/color4.h | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/vcg/space/color4.h b/vcg/space/color4.h index 49b2acd6..bb6ba679 100644 --- a/vcg/space/color4.h +++ b/vcg/space/color4.h @@ -391,10 +391,10 @@ template<> inline Color4 Color4::operator + ( const Color4 & p) const { return Color4( - math::Clamp(int((*this)[0])+int(p[0]),0,255), - math::Clamp(int((*this)[1])+int(p[1]),0,255), - math::Clamp(int((*this)[2])+int(p[2]),0,255), - math::Clamp(int((*this)[3])+int(p[3]),0,255) + (unsigned char)(math::Clamp(int((*this)[0])+int(p[0]),0,255)), + (unsigned char)(math::Clamp(int((*this)[1])+int(p[1]),0,255)), + (unsigned char)(math::Clamp(int((*this)[2])+int(p[2]),0,255)), + (unsigned char)(math::Clamp(int((*this)[3])+int(p[3]),0,255)) ); }