Commit c9c68894 authored by Jan Möbius's avatar Jan Möbius

Fixed some size_t warnings

git-svn-id: http://www.openmesh.org/svnrepo/OpenMesh/trunk@849 fdac6126-5c0c-442c-9429-916003d36597
parent 6428c6b9
......@@ -49,14 +49,14 @@ TEST_F(OpenMeshDecimater, DecimateMesh) {
HModQuadric hModQuadricDBG;
decimaterDBG.add( hModQuadricDBG );
decimaterDBG.initialize();
int removedVertices = 0;
size_t removedVertices = 0;
removedVertices = decimaterDBG.decimate_to(5000);
decimaterDBG.mesh().garbage_collection();
EXPECT_EQ(2526, removedVertices) << "The number of remove vertices is not correct!";
EXPECT_EQ(2526, removedVertices) << "The number of remove vertices is not correct!";
EXPECT_EQ(5000u, mesh_.n_vertices()) << "The number of vertices after decimation is not correct!";
EXPECT_EQ(14994u, mesh_.n_edges()) << "The number of edges after decimation is not correct!";
EXPECT_EQ(9996u, mesh_.n_faces()) << "The number of faces after decimation is not correct!";
EXPECT_EQ(14994u, mesh_.n_edges()) << "The number of edges after decimation is not correct!";
EXPECT_EQ(9996u, mesh_.n_faces()) << "The number of faces after decimation is not correct!";
}
TEST_F(OpenMeshDecimater, DecimateMeshToFaceVerticesLimit) {
......@@ -73,7 +73,7 @@ TEST_F(OpenMeshDecimater, DecimateMeshToFaceVerticesLimit) {
HModQuadric hModQuadricDBG;
decimaterDBG.add( hModQuadricDBG );
decimaterDBG.initialize();
int removedVertices = 0;
size_t removedVertices = 0;
removedVertices = decimaterDBG.decimate_to_faces(5000, 8000);
decimaterDBG.mesh().garbage_collection();
......@@ -97,7 +97,7 @@ TEST_F(OpenMeshDecimater, DecimateMeshToFaceFaceLimit) {
HModQuadric hModQuadricDBG;
decimaterDBG.add( hModQuadricDBG );
decimaterDBG.initialize();
int removedVertices = 0;
size_t removedVertices = 0;
removedVertices = decimaterDBG.decimate_to_faces(4500, 9996);
decimaterDBG.mesh().garbage_collection();
......
......@@ -182,13 +182,13 @@ TEST_F(OpenMeshDeleteFaceTriangleMesh, DeleteHalfTriangleMeshCubeNoEdgeStatus) {
mesh_.request_face_status();
mesh_.request_vertex_status();
mesh_.request_halfedge_status();
const unsigned int n_face_to_delete = mesh_.n_faces()/2;
const size_t n_face_to_delete = mesh_.n_faces()/2;
// Check the variable
EXPECT_EQ(6u, n_face_to_delete ) << "Wrong number of faces to delete";
for(size_t i = 0; i < n_face_to_delete; i++)
mesh_.delete_face(mesh_.face_handle(i));
mesh_.delete_face(mesh_.face_handle(int(i)));
// =====================================================
// Check config afterwards
......@@ -343,13 +343,13 @@ TEST_F(OpenMeshDeleteFaceTriangleMesh, DeleteHalfTriangleMeshCubeWithEdgeStatus)
mesh_.request_vertex_status();
mesh_.request_edge_status();
mesh_.request_halfedge_status();
const unsigned int n_face_to_delete = mesh_.n_faces()/2;
const size_t n_face_to_delete = mesh_.n_faces()/2;
// Check the variable
EXPECT_EQ(6u, n_face_to_delete ) << "Wrong number of faces to delete";
for(size_t i = 0; i < n_face_to_delete; i++)
mesh_.delete_face(mesh_.face_handle(i));
mesh_.delete_face(mesh_.face_handle(int(i)));
// =====================================================
// Check config afterwards
......@@ -464,13 +464,13 @@ TEST_F(OpenMeshDeleteFacePolyMesh, DeleteteHalfPolyMeshCubeWithoutEdgeStatus) {
mesh_.request_face_status();
mesh_.request_vertex_status();
mesh_.request_halfedge_status();
const unsigned int n_face_to_delete = mesh_.n_faces()/2;
const size_t n_face_to_delete = mesh_.n_faces()/2;
// Check the variable
EXPECT_EQ(3u, n_face_to_delete ) << "Wrong number of faces to delete";
for(size_t i = 0; i < n_face_to_delete; i++)
mesh_.delete_face(mesh_.face_handle(i));
mesh_.delete_face(mesh_.face_handle(int(i)));
// =====================================================
// Check config afterwards
......@@ -584,13 +584,13 @@ TEST_F(OpenMeshDeleteFacePolyMesh, DeleteteHalfPolyMeshCubeWithEdgeStatus) {
mesh_.request_vertex_status();
mesh_.request_edge_status();
mesh_.request_halfedge_status();
const unsigned int n_face_to_delete = mesh_.n_faces()/2;
const size_t n_face_to_delete = mesh_.n_faces()/2;
// Check the variable
EXPECT_EQ(3u, n_face_to_delete ) << "Wrong number of faces to delete";
for(size_t i = 0; i < n_face_to_delete; i++)
mesh_.delete_face(mesh_.face_handle(i));
mesh_.delete_face(mesh_.face_handle(int(i)));
// =====================================================
// Check config afterwards
......
......@@ -49,7 +49,7 @@ TEST_F(OpenMeshMultipleChoiceDecimater, DecimateMesh) {
HModQuadric hModQuadricDBG;
decimaterDBG.add( hModQuadricDBG );
decimaterDBG.initialize();
int removedVertices = 0;
size_t removedVertices = 0;
removedVertices = decimaterDBG.decimate_to(5000);
decimaterDBG.mesh().garbage_collection();
......@@ -73,7 +73,7 @@ TEST_F(OpenMeshMultipleChoiceDecimater, DecimateMeshToFaceVerticesLimit) {
HModQuadric hModQuadricDBG;
decimaterDBG.add( hModQuadricDBG );
decimaterDBG.initialize();
int removedVertices = 0;
size_t removedVertices = 0;
removedVertices = decimaterDBG.decimate_to_faces(5000, 8000);
decimaterDBG.mesh().garbage_collection();
......@@ -97,7 +97,7 @@ TEST_F(OpenMeshMultipleChoiceDecimater, DecimateMeshToFaceFaceLimit) {
HModQuadric hModQuadricDBG;
decimaterDBG.add( hModQuadricDBG );
decimaterDBG.initialize();
int removedVertices = 0;
size_t removedVertices = 0;
removedVertices = decimaterDBG.decimate_to_faces(4500, 9996);
decimaterDBG.mesh().garbage_collection();
......
......@@ -49,7 +49,7 @@ TEST_F(OpenMeshMixedDecimater, DecimateMesh80PercentMc) {
HModQuadric hModQuadricDBG;
decimaterDBG.add( hModQuadricDBG );
decimaterDBG.initialize();
int removedVertices = 0;
size_t removedVertices = 0;
removedVertices = decimaterDBG.decimate_to(5000,0.8f);
decimaterDBG.mesh().garbage_collection();
......@@ -73,7 +73,7 @@ TEST_F(OpenMeshMixedDecimater, DecimateMeshToFaceVerticesLimit) {
HModQuadric hModQuadricDBG;
decimaterDBG.add( hModQuadricDBG );
decimaterDBG.initialize();
int removedVertices = 0;
size_t removedVertices = 0;
removedVertices = decimaterDBG.decimate_to_faces(5000, 8000, 0.7f);
decimaterDBG.mesh().garbage_collection();
......@@ -97,7 +97,7 @@ TEST_F(OpenMeshMixedDecimater, DecimateMeshToFaceFaceLimit) {
HModQuadric hModQuadricDBG;
decimaterDBG.add( hModQuadricDBG );
decimaterDBG.initialize();
int removedVertices = 0;
size_t removedVertices = 0;
removedVertices = decimaterDBG.decimate_to_faces(4500, 9996, 0.7f);
decimaterDBG.mesh().garbage_collection();
......
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