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

More cppcheck fixes in OM

git-svn-id: http://www.openmesh.org/svnrepo/OpenMesh/trunk@1075 fdac6126-5c0c-442c-9429-916003d36597
parent 6d58a6e1
...@@ -491,7 +491,7 @@ binary_size(BaseExporter& _be, Options _opt) const ...@@ -491,7 +491,7 @@ binary_size(BaseExporter& _be, Options _opt) const
{ {
size_t header(0); size_t header(0);
size_t data(0); size_t data(0);
size_t _3longs(3*sizeof(long));
size_t _3floats(3*sizeof(float)); size_t _3floats(3*sizeof(float));
size_t _3ui(3*sizeof(unsigned int)); size_t _3ui(3*sizeof(unsigned int));
size_t _4ui(4*sizeof(unsigned int)); size_t _4ui(4*sizeof(unsigned int));
...@@ -500,6 +500,8 @@ binary_size(BaseExporter& _be, Options _opt) const ...@@ -500,6 +500,8 @@ binary_size(BaseExporter& _be, Options _opt) const
return 0; return 0;
else else
{ {
size_t _3longs(3*sizeof(long));
header += 11; // 'OFF BINARY\n' header += 11; // 'OFF BINARY\n'
header += _3longs; // #V #F #E header += _3longs; // #V #F #E
data += _be.n_vertices() * _3floats; // vertex data data += _be.n_vertices() * _3floats; // vertex data
......
...@@ -535,7 +535,6 @@ binary_size(BaseExporter& _be, Options _opt) const ...@@ -535,7 +535,6 @@ binary_size(BaseExporter& _be, Options _opt) const
{ {
size_t header(0); size_t header(0);
size_t data(0); size_t data(0);
size_t _3longs(3*sizeof(long));
size_t _3floats(3*sizeof(float)); size_t _3floats(3*sizeof(float));
size_t _3ui(3*sizeof(unsigned int)); size_t _3ui(3*sizeof(unsigned int));
size_t _4ui(4*sizeof(unsigned int)); size_t _4ui(4*sizeof(unsigned int));
...@@ -544,6 +543,9 @@ binary_size(BaseExporter& _be, Options _opt) const ...@@ -544,6 +543,9 @@ binary_size(BaseExporter& _be, Options _opt) const
return 0; return 0;
else else
{ {
size_t _3longs(3*sizeof(long));
header += 11; // 'OFF BINARY\n' header += 11; // 'OFF BINARY\n'
header += _3longs; // #V #F #E header += _3longs; // #V #F #E
data += _be.n_vertices() * _3floats; // vertex data data += _be.n_vertices() * _3floats; // vertex data
......
...@@ -263,7 +263,6 @@ TEST_F(OpenMeshAddFaceTriangleMesh, CreateStrangeConfig) { ...@@ -263,7 +263,6 @@ TEST_F(OpenMeshAddFaceTriangleMesh, CreateStrangeConfig) {
Mesh::VertexHandle vh[7]; Mesh::VertexHandle vh[7];
Mesh::FaceHandle fh[4];
// //
// 2 x-----------x 1 // 2 x-----------x 1
......
...@@ -258,7 +258,6 @@ TEST_F(OpenMeshTrimeshCirculatorFaceFace, FaceFaceIteratorHandleConversion) { ...@@ -258,7 +258,6 @@ TEST_F(OpenMeshTrimeshCirculatorFaceFace, FaceFaceIteratorHandleConversion) {
// Get the face via the handle // Get the face via the handle
Mesh::FaceHandle faceHandle1 = *face_iter; Mesh::FaceHandle faceHandle1 = *face_iter;
const Mesh::Face& face1 = mesh_.face(faceHandle1);
EXPECT_EQ(1, faceHandle1.idx() ) << "Wrong face handle index when getting from iterator via handle"; EXPECT_EQ(1, faceHandle1.idx() ) << "Wrong face handle index when getting from iterator via handle";
} }
......
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