Commit 5cd4bc04 authored by Jan Möbius's avatar Jan Möbius
Browse files

cppcheck warnings

git-svn-id: http://www.openmesh.org/svnrepo/OpenMesh/trunk@941 fdac6126-5c0c-442c-9429-916003d36597
parent 721a2cbb
......@@ -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
......
......@@ -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);
}
}
......
......@@ -160,12 +160,11 @@ set_active_vertices()
// tagg all active vertices
bool active;
for (v_it=mesh_.vertices_begin(); v_it!=v_end; ++v_it)
{
active = ((nothing_selected || mesh_.status(*v_it).selected())
&& !mesh_.is_boundary(*v_it)
&& !mesh_.status(*v_it).locked());
bool active = ((nothing_selected || mesh_.status(*v_it).selected())
&& !mesh_.is_boundary(*v_it)
&& !mesh_.status(*v_it).locked());
if ( skip_features_ ) {
......
......@@ -992,9 +992,7 @@ void CompositeT<MeshType,RealType>::VV()
{
assert(p_mesh_); MeshType& mesh_ = *p_mesh_;
unsigned int valence;
typename MeshType::Point cog,
zero_point(0.0, 0.0, 0.0);
typename MeshType::Point cog, zero_point(0.0, 0.0, 0.0);
typename MeshType::VertexVertexIter vv_it;
typename MeshType::VertexIter v_it;
std::vector<typename MeshType::Point> point_vector;
......@@ -1003,7 +1001,7 @@ void CompositeT<MeshType,RealType>::VV()
for (v_it = mesh_.vertices_begin(); v_it != mesh_.vertices_end(); ++v_it) {
valence = 0;
unsigned int valence = 0;
cog = zero_point;
for (vv_it = mesh_.vv_iter(*v_it); vv_it; ++vv_it) {
......@@ -1141,9 +1139,7 @@ void CompositeT<MeshType,RealType>::EdEc(scalar_t _c)
{
assert(p_mesh_); MeshType& mesh_ = *p_mesh_;
unsigned int valence;
typename MeshType::Point cog,
zero_point(0.0, 0.0, 0.0);
typename MeshType::Point cog, zero_point(0.0, 0.0, 0.0);
typename MeshType::EdgeIter e_it;
typename MeshType::HalfedgeHandle heh;
std::vector<typename MeshType::Point> point_vector;
......@@ -1152,7 +1148,7 @@ void CompositeT<MeshType,RealType>::EdEc(scalar_t _c)
for (e_it = mesh_.edges_begin(); e_it != mesh_.edges_end(); ++e_it)
{
valence = 0;
unsigned int valence = 0;
cog = zero_point;
for (int i = 0; i <= 1; ++i) {
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment