From 7215846f210a5ba758ae4f70ce3e18561efc83c7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jan=20M=C3=B6bius?= Date: Tue, 19 May 2009 14:10:04 +0000 Subject: [PATCH] Removed warnings in PLY Reader ( Thanks to Ilya A. Kriveshko) git-svn-id: http://www.openmesh.org/svnrepo/OpenMesh/trunk@128 fdac6126-5c0c-442c-9429-916003d36597 --- src/OpenMesh/Core/IO/reader/PLYReader.cc | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/src/OpenMesh/Core/IO/reader/PLYReader.cc b/src/OpenMesh/Core/IO/reader/PLYReader.cc index c6402d6a..e0c1ec8c 100644 --- a/src/OpenMesh/Core/IO/reader/PLYReader.cc +++ b/src/OpenMesh/Core/IO/reader/PLYReader.cc @@ -192,25 +192,25 @@ _PLYReader_::read_ascii(std::fstream& _in, BaseImporter& _bi) const break; case COLORRED: if ( vertexPropertyMap_ [ propertyIndex].second == ValueTypeFLOAT32 ){ - _in >> tmp; c[0] = tmp * 255.0f; + _in >> tmp; c[0] = static_cast(tmp * 255.0f); }else _in >> c[0]; break; case COLORGREEN: if ( vertexPropertyMap_ [ propertyIndex].second == ValueTypeFLOAT32 ){ - _in >> tmp; c[1] = tmp * 255.0f; + _in >> tmp; c[1] = static_cast(tmp * 255.0f); }else _in >> c[1]; break; case COLORBLUE: if ( vertexPropertyMap_ [ propertyIndex].second == ValueTypeFLOAT32 ){ - _in >> tmp; c[2] = tmp * 255.0f; + _in >> tmp; c[2] = static_cast(tmp * 255.0f); }else _in >> c[2]; break; case COLORALPHA: if ( vertexPropertyMap_ [ propertyIndex].second == ValueTypeFLOAT32 ){ - _in >> tmp; c[3] = tmp * 255.0f; + _in >> tmp; c[3] = static_cast(tmp * 255.0f); }else _in >> c[3]; break; @@ -372,28 +372,28 @@ _PLYReader_::read_binary(std::fstream& _in, BaseImporter& _bi, bool /*_swap*/) c if ( vertexPropertyMap_ [ propertyIndex].second == ValueTypeFLOAT32 ){ readValue(vertexPropertyMap_ [ propertyIndex].second,_in,tmp); - c[0] = tmp * 255.0f; + c[0] = static_cast(tmp * 255.0f); }else readValue(vertexPropertyMap_ [ propertyIndex].second,_in,c[0]); break; case COLORGREEN: if ( vertexPropertyMap_ [ propertyIndex].second == ValueTypeFLOAT32 ){ readValue(vertexPropertyMap_ [ propertyIndex].second,_in,tmp); - c[1] = tmp * 255.0f; + c[1] = static_cast(tmp * 255.0f); }else readValue(vertexPropertyMap_ [ propertyIndex].second,_in,c[1]); break; case COLORBLUE: if ( vertexPropertyMap_ [ propertyIndex].second == ValueTypeFLOAT32 ){ readValue(vertexPropertyMap_ [ propertyIndex].second,_in,tmp); - c[2] = tmp * 255.0f; + c[2] = static_cast(tmp * 255.0f); }else readValue(vertexPropertyMap_ [ propertyIndex].second,_in,c[2]); break; case COLORALPHA: if ( vertexPropertyMap_ [ propertyIndex].second == ValueTypeFLOAT32 ){ readValue(vertexPropertyMap_ [ propertyIndex].second,_in,tmp); - c[3] = tmp * 255.0f; + c[3] = static_cast(tmp * 255.0f); }else readValue(vertexPropertyMap_ [ propertyIndex].second,_in,c[3]); break;