removed harmless gcc warnings

This commit is contained in:
Paolo Cignoni 2007-12-13 17:57:33 +00:00
parent 1736e204dd
commit 8b69adbfbd
3 changed files with 14 additions and 7 deletions

View File

@ -24,6 +24,9 @@
History History
$Log: not supported by cvs2svn $ $Log: not supported by cvs2svn $
Revision 1.17 2007/11/23 17:02:47 cignoni
disambiguated pow call (again)
Revision 1.16 2007/11/23 15:42:11 cignoni Revision 1.16 2007/11/23 15:42:11 cignoni
disambiguated pow call disambiguated pow call
@ -241,7 +244,6 @@ static void PerVertexNormalized(ComputeMeshType &m)
/// multiply the vertex normals by the matrix passed. By default, the scale component is removed /// multiply the vertex normals by the matrix passed. By default, the scale component is removed
static void PerVertexMatrix(ComputeMeshType &m, const Matrix44<ScalarType> &mat, bool remove_scaling= true){ static void PerVertexMatrix(ComputeMeshType &m, const Matrix44<ScalarType> &mat, bool remove_scaling= true){
float pos_33;
float scale; float scale;
Matrix33<ScalarType> mat33(mat,3); Matrix33<ScalarType> mat33(mat,3);
@ -262,7 +264,6 @@ static void PerVertexMatrix(ComputeMeshType &m, const Matrix44<ScalarType> &mat,
/// multiply the face normals by the matrix passed. By default, the scale component is removed /// multiply the face normals by the matrix passed. By default, the scale component is removed
static void PerFaceMatrix(ComputeMeshType &m, const Matrix44<ScalarType> &mat, bool remove_scaling= true){ static void PerFaceMatrix(ComputeMeshType &m, const Matrix44<ScalarType> &mat, bool remove_scaling= true){
float pos_33;
float scale; float scale;
Matrix33<ScalarType> mat33(mat,3); Matrix33<ScalarType> mat33(mat,3);

View File

@ -25,6 +25,9 @@
History History
$Log: not supported by cvs2svn $ $Log: not supported by cvs2svn $
Revision 1.17 2007/10/17 09:49:50 cignoni
correct management of point only files
Revision 1.16 2007/07/20 14:49:46 cignoni Revision 1.16 2007/07/20 14:49:46 cignoni
Added in load mask the face color bit when there is a generic material used Added in load mask the face color bit when there is a generic material used
@ -559,7 +562,7 @@ static int Open( OpenMeshType &m, const char * filename, Info &oi)
// Now the final pass to convert indexes into pointers for face to vert/norm/tex references // Now the final pass to convert indexes into pointers for face to vert/norm/tex references
for(int i=0;i<numTriangles;++i) for(int i=0;i<numTriangles;++i)
{ {
assert(m.face.size()==m.fn); assert(m.face.size()==size_t(m.fn));
for(int j=0;j<3;++j) for(int j=0;j<3;++j)
{ {
m.face[i].V(j)=&(m.vert[indexedFaces[i].v[j]]); m.face[i].V(j)=&(m.vert[indexedFaces[i].v[j]]);

View File

@ -24,6 +24,9 @@
History History
$Log: not supported by cvs2svn $ $Log: not supported by cvs2svn $
Revision 1.20 2007/03/12 16:40:17 tarini
Texture coord name change! "TCoord" and "Texture" are BAD. "TexCoord" is GOOD.
Revision 1.19 2006/03/29 08:50:10 corsini Revision 1.19 2006/03/29 08:50:10 corsini
Fix bug in texture coordinates reading Fix bug in texture coordinates reading
@ -324,7 +327,7 @@ namespace vcg
else if (nb_color_components == 3) else if (nb_color_components == 3)
{ {
// read RGB color // read RGB color
if (tokens[k].find(".") == -1) if (tokens[k].find(".") == size_t(-1))// if it is a float there is a dot
{ {
// integers // integers
unsigned char r = unsigned char r =
@ -351,7 +354,7 @@ namespace vcg
else if (nb_color_components == 4) else if (nb_color_components == 4)
{ {
// read RGBA color // read RGBA color
if (tokens[k].find(".") == -1) if (tokens[k].find(".") == size_t(-1))
{ {
// integers // integers
unsigned char r = unsigned char r =
@ -504,7 +507,7 @@ namespace vcg
} }
case 3: case 3:
{ {
if (tokens[vert_per_face+1].find('.')==-1) if (tokens[vert_per_face+1].find('.')==size_t(-1))
{ {
int rgb[3]; int rgb[3];
rgb[0] = atoi( tokens[vert_per_face+1].c_str() ); rgb[0] = atoi( tokens[vert_per_face+1].c_str() );
@ -526,7 +529,7 @@ namespace vcg
} }
case 4: case 4:
{ {
if (tokens[vert_per_face+1].find('.')==-1) if (tokens[vert_per_face+1].find('.')==0) // if it is a float there is a dot
{ {
unsigned char color[4]; unsigned char color[4];
color[0] = (unsigned char) atoi(tokens[vert_per_face+1].c_str()); color[0] = (unsigned char) atoi(tokens[vert_per_face+1].c_str());