From 6e62de90d461b4407d38c4cd3e52d0b8079a17a3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jan=20M=C3=B6bius?= Date: Tue, 23 Jul 2013 13:32:21 +0000 Subject: [PATCH] Fixed size_t conversion warnings in OBJReader git-svn-id: http://www.openmesh.org/svnrepo/OpenMesh/trunk@843 fdac6126-5c0c-442c-9429-916003d36597 --- src/OpenMesh/Core/IO/reader/OBJReader.cc | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/src/OpenMesh/Core/IO/reader/OBJReader.cc b/src/OpenMesh/Core/IO/reader/OBJReader.cc index 9b918706..a88a9738 100644 --- a/src/OpenMesh/Core/IO/reader/OBJReader.cc +++ b/src/OpenMesh/Core/IO/reader/OBJReader.cc @@ -504,7 +504,7 @@ read(std::istream& _in, BaseImporter& _bi, Options& _opt) // Calculation of index : // -1 is the last vertex in the list // As obj counts from 1 and not zero add +1 - value = _bi.n_vertices() + value + 1; + value = int(_bi.n_vertices() + value + 1); } // Obj counts from 1 and not zero .. array counts from zero therefore -1 vhandles.push_back(VertexHandle(value-1)); @@ -518,7 +518,7 @@ read(std::istream& _in, BaseImporter& _bi, Options& _opt) // Calculation of index : // -1 is the last vertex in the list // As obj counts from 1 and not zero add +1 - value = texcoords.size() + value + 1; + value = int(texcoords.size()) + value + 1; } assert(!vhandles.empty()); @@ -551,7 +551,7 @@ read(std::istream& _in, BaseImporter& _bi, Options& _opt) // Calculation of index : // -1 is the last vertex in the list // As obj counts from 1 and not zero add +1 - value = normals.size() + value + 1; + value = int(normals.size()) + value + 1; } // Obj counts from 1 and not zero .. array counts from zero therefore -1 @@ -587,7 +587,7 @@ read(std::istream& _in, BaseImporter& _bi, Options& _opt) std::vector newfaces; for( size_t i=0; i < _bi.n_faces()-n_faces; ++i ) - newfaces.push_back(FaceHandle(n_faces+i)); + newfaces.push_back(FaceHandle(int(n_faces+i))); Material& mat = materials_[matname]; @@ -630,7 +630,7 @@ read(std::istream& _in, BaseImporter& _bi, Options& _opt) std::vector newfaces; for( size_t i=0; i < _bi.n_faces()-n_faces; ++i ) - newfaces.push_back(FaceHandle(n_faces+i)); + newfaces.push_back(FaceHandle(int(n_faces+i))); // Set the texture index to zero as we don't have any information if ( userOptions.face_has_texcoord() )