cppcheck warnings

git-svn-id: http://www.openmesh.org/svnrepo/OpenMesh/trunk@941 fdac6126-5c0c-442c-9429-916003d36597
This commit is contained in:
Jan Möbius
2013-08-21 10:00:59 +00:00
parent 721a2cbb84
commit 5cd4bc0444
4 changed files with 19 additions and 28 deletions

View File

@@ -178,7 +178,7 @@ write_ascii(std::ostream& _out, BaseExporter& _be, Options _opt) const
omlog() << "[OFFWriter] : write ascii file\n";
unsigned int i, j, nV, nF;
unsigned int i, nV, nF;
Vec3f v, n;
Vec2f t;
OpenMesh::Vec3i c;
@@ -292,7 +292,7 @@ write_ascii(std::ostream& _out, BaseExporter& _be, Options _opt) const
{
nV = _be.get_vhandles(FaceHandle(i), vhandles);
_out << nV << " ";
for (j=0; j<vhandles.size(); ++j)
for (size_t j=0; j<vhandles.size(); ++j)
_out << vhandles[j].idx() << " ";
//face color
@@ -356,7 +356,7 @@ write_binary(std::ostream& _out, BaseExporter& _be, Options _opt) const
omlog() << "[OFFWriter] : write binary file\n";
unsigned int i, j, nV, nF;
unsigned int i, nV, nF;
Vec3f v, n;
Vec2f t;
OpenMesh::Vec4i c;
@@ -457,7 +457,7 @@ write_binary(std::ostream& _out, BaseExporter& _be, Options _opt) const
//face
nV = _be.get_vhandles(FaceHandle(i), vhandles);
writeValue(_out, nV);
for (j=0; j<vhandles.size(); ++j)
for (size_t j=0; j<vhandles.size(); ++j)
writeValue(_out, vhandles[j].idx() );
//face color
@@ -535,15 +535,12 @@ binary_size(BaseExporter& _be, Options _opt) const
}
else
{
unsigned int i, nV, nF;
unsigned int i, nF;
std::vector<VertexHandle> vhandles;
for (i=0, nF=int(_be.n_faces()); i<nF; ++i)
{
nV = _be.get_vhandles(FaceHandle(i), vhandles);
data += nV * sizeof(unsigned int);
data += _be.get_vhandles(FaceHandle(i), vhandles) * sizeof(unsigned int);
}
}
// face colors

View File

@@ -233,7 +233,7 @@ write_ascii(std::ostream& _out, BaseExporter& _be, Options _opt) const
{
omlog() << "[PLYWriter] : write ascii file\n";
unsigned int i, j, nV, nF;
unsigned int i, nV, nF;
Vec3f v, n;
OpenMesh::Vec3ui c;
OpenMesh::Vec4ui cA;
@@ -327,7 +327,7 @@ write_ascii(std::ostream& _out, BaseExporter& _be, Options _opt) const
{
nV = _be.get_vhandles(FaceHandle(i), vhandles);
_out << nV << " ";
for (j=0; j<vhandles.size(); ++j)
for (size_t j=0; j<vhandles.size(); ++j)
_out << vhandles[j].idx() << " ";
// //face color
@@ -420,7 +420,7 @@ write_binary(std::ostream& _out, BaseExporter& _be, Options _opt) const
{
omlog() << "[PLYWriter] : write binary file\n";
unsigned int i, j, nV, nF;
unsigned int i, nV, nF;
Vec3f v, n;
Vec2f t;
OpenMesh::Vec4uc c;
@@ -509,7 +509,7 @@ write_binary(std::ostream& _out, BaseExporter& _be, Options _opt) const
//face
nV = _be.get_vhandles(FaceHandle(i), vhandles);
writeValue(ValueTypeUINT8, _out, nV);
for (j=0; j<vhandles.size(); ++j)
for (size_t j=0; j<vhandles.size(); ++j)
writeValue(ValueTypeINT32, _out, vhandles[j].idx() );
// //face color
@@ -577,13 +577,12 @@ binary_size(BaseExporter& _be, Options _opt) const
}
else
{
unsigned int i, nV, nF;
unsigned int i, nF;
std::vector<VertexHandle> vhandles;
for (i=0, nF=int(_be.n_faces()); i<nF; ++i)
{
nV = _be.get_vhandles(FaceHandle(i), vhandles);
data += nV * sizeof(unsigned int);
data += _be.get_vhandles(FaceHandle(i), vhandles) * sizeof(unsigned int);
}
}