Commit 6a6175ff authored by Jan Möbius's avatar Jan Möbius

Merge branch 'fix_warnings' into 'master'

Fix warnings

See merge request !242
parents aa50a3ee 7926bc92
Pipeline #13118 passed with stages
in 204 minutes and 11 seconds
......@@ -206,7 +206,6 @@ _OBJWriter_::
write(std::ostream& _out, BaseExporter& _be, Options _opt, std::streamsize _precision) const
{
unsigned int idx;
size_t nV, nF;
Vec3f v, n;
Vec2f t;
VertexHandle vh;
......
......@@ -40,11 +40,7 @@ bool _VTKWriter_::write(const std::string& _filename, BaseExporter& _be, Options
bool _VTKWriter_::write(std::ostream& _out, BaseExporter& _be, Options _opt, std::streamsize _precision) const
{
Vec3f n;
Vec2f t;
VertexHandle vh;
OpenMesh::Vec3f c;
OpenMesh::Vec4f cA;
// check exporter features
if (!check(_be, _opt)) {
......
......@@ -43,7 +43,6 @@ TEST_F(OpenMeshMultipleChoiceDecimater, DecimateMesh) {
typedef OpenMesh::Decimater::McDecimaterT< Mesh > Decimater;
typedef OpenMesh::Decimater::ModQuadricT< Mesh >::Handle HModQuadric;
typedef OpenMesh::Decimater::ModNormalFlippingT< Mesh >::Handle HModNormal;
Decimater decimaterDBG(mesh_);
HModQuadric hModQuadricDBG;
......@@ -67,7 +66,6 @@ TEST_F(OpenMeshMultipleChoiceDecimater, DecimateMeshToFaceVerticesLimit) {
typedef OpenMesh::Decimater::McDecimaterT< Mesh > Decimater;
typedef OpenMesh::Decimater::ModQuadricT< Mesh >::Handle HModQuadric;
typedef OpenMesh::Decimater::ModNormalFlippingT< Mesh >::Handle HModNormal;
Decimater decimaterDBG(mesh_);
HModQuadric hModQuadricDBG;
......@@ -91,7 +89,6 @@ TEST_F(OpenMeshMultipleChoiceDecimater, DecimateMeshToFaceFaceLimit) {
typedef OpenMesh::Decimater::McDecimaterT< Mesh > Decimater;
typedef OpenMesh::Decimater::ModQuadricT< Mesh >::Handle HModQuadric;
typedef OpenMesh::Decimater::ModNormalFlippingT< Mesh >::Handle HModNormal;
Decimater decimaterDBG(mesh_);
HModQuadric hModQuadricDBG;
......
......@@ -43,7 +43,6 @@ TEST_F(OpenMeshMixedDecimater, DecimateMesh80PercentMc) {
typedef OpenMesh::Decimater::MixedDecimaterT< Mesh > Decimater;
typedef OpenMesh::Decimater::ModQuadricT< Mesh >::Handle HModQuadric;
typedef OpenMesh::Decimater::ModNormalFlippingT< Mesh >::Handle HModNormal;
Decimater decimaterDBG(mesh_);
HModQuadric hModQuadricDBG;
......@@ -67,7 +66,6 @@ TEST_F(OpenMeshMixedDecimater, DecimateMeshToFaceVerticesLimit) {
typedef OpenMesh::Decimater::MixedDecimaterT< Mesh > Decimater;
typedef OpenMesh::Decimater::ModQuadricT< Mesh >::Handle HModQuadric;
typedef OpenMesh::Decimater::ModNormalFlippingT< Mesh >::Handle HModNormal;
Decimater decimaterDBG(mesh_);
HModQuadric hModQuadricDBG;
......@@ -91,7 +89,6 @@ TEST_F(OpenMeshMixedDecimater, DecimateMeshToFaceFaceLimit) {
typedef OpenMesh::Decimater::MixedDecimaterT< Mesh > Decimater;
typedef OpenMesh::Decimater::ModQuadricT< Mesh >::Handle HModQuadric;
typedef OpenMesh::Decimater::ModNormalFlippingT< Mesh >::Handle HModNormal;
Decimater decimaterDBG(mesh_);
HModQuadric hModQuadricDBG;
......
......@@ -234,9 +234,9 @@ TEST_F(OpenMeshPropertyManager, property_move_construction) {
for (auto vh : mesh_.vertices())
prop1[vh] = vh.idx()*2-13;
auto t_start = std::chrono::high_resolution_clock::now();
TIMING_OUTPUT(auto t_start = std::chrono::high_resolution_clock::now();)
auto prop2 = std::move(prop1);
auto t_end = std::chrono::high_resolution_clock::now();
TIMING_OUTPUT(auto t_end = std::chrono::high_resolution_clock::now();)
TIMING_OUTPUT(std::cout << "move constructing property from temporary took " << std::chrono::duration_cast<std::chrono::milliseconds>(t_end-t_start).count() << "ms" << std::endl;)
EXPECT_FALSE(prop1.isValid()) << "prop1 should have been invalidated";
......@@ -250,9 +250,9 @@ TEST_F(OpenMeshPropertyManager, property_move_construction) {
for (auto vh : mesh_.vertices())
prop1[vh] = vh.idx()*2-13;
auto t_start = std::chrono::high_resolution_clock::now();
TIMING_OUTPUT(auto t_start = std::chrono::high_resolution_clock::now();)
auto prop2 = std::move(prop1); // prop1 and prop2 should refere to the same property
auto t_end = std::chrono::high_resolution_clock::now();
TIMING_OUTPUT(auto t_end = std::chrono::high_resolution_clock::now();)
TIMING_OUTPUT(std::cout << "move constructing from named took " << std::chrono::duration_cast<std::chrono::milliseconds>(t_end-t_start).count() << "ms" << std::endl;)
EXPECT_TRUE(prop1.isValid()) << "named properties cannot be invalidated";
......@@ -285,9 +285,9 @@ TEST_F(OpenMeshPropertyManager, property_copying_same_mesh) {
EXPECT_EQ(prop2[OpenMesh::VertexHandle(0)], 0) << "Property not initialized correctly";
auto t_start = std::chrono::high_resolution_clock::now();
TIMING_OUTPUT(auto t_start = std::chrono::high_resolution_clock::now();)
prop2 = prop1;
auto t_end = std::chrono::high_resolution_clock::now();
TIMING_OUTPUT(auto t_end = std::chrono::high_resolution_clock::now();)
TIMING_OUTPUT(std::cout << "copying property temporary to temporary took " << std::chrono::duration_cast<std::chrono::milliseconds>(t_end-t_start).count() << "ms" << std::endl;)
EXPECT_EQ(prop1[OpenMesh::VertexHandle(0)], -13) << "Temporary property got destroyed";
......@@ -309,9 +309,9 @@ TEST_F(OpenMeshPropertyManager, property_copying_same_mesh) {
EXPECT_EQ(prop2[OpenMesh::VertexHandle(0)], 0) << "Property not initialized correctly";
auto t_start = std::chrono::high_resolution_clock::now();
TIMING_OUTPUT(auto t_start = std::chrono::high_resolution_clock::now();)
prop2 = prop1;
auto t_end = std::chrono::high_resolution_clock::now();
TIMING_OUTPUT(auto t_end = std::chrono::high_resolution_clock::now();)
TIMING_OUTPUT(std::cout << "copying property temporary to named took " << std::chrono::duration_cast<std::chrono::milliseconds>(t_end-t_start).count() << "ms" << std::endl;)
EXPECT_EQ(prop1[OpenMesh::VertexHandle(0)], -13) << "Temporary property got destroyed";
......@@ -334,9 +334,9 @@ TEST_F(OpenMeshPropertyManager, property_copying_same_mesh) {
for (auto vh : mesh_.vertices())
prop1[vh] = vh.idx()*2-13;
auto t_start = std::chrono::high_resolution_clock::now();
TIMING_OUTPUT(auto t_start = std::chrono::high_resolution_clock::now();)
prop2 = prop1;
auto t_end = std::chrono::high_resolution_clock::now();
TIMING_OUTPUT(auto t_end = std::chrono::high_resolution_clock::now();)
TIMING_OUTPUT(std::cout << "copying property named to temporary took " << std::chrono::duration_cast<std::chrono::milliseconds>(t_end-t_start).count() << "ms" << std::endl;)
prop1.set_range(mesh_.vertices(), 0);
......@@ -357,9 +357,9 @@ TEST_F(OpenMeshPropertyManager, property_copying_same_mesh) {
EXPECT_EQ(prop2[OpenMesh::VertexHandle(0)], 0) << "Property not initialized correctly";
auto t_start = std::chrono::high_resolution_clock::now();
TIMING_OUTPUT(auto t_start = std::chrono::high_resolution_clock::now();)
prop2 = prop1;
auto t_end = std::chrono::high_resolution_clock::now();
TIMING_OUTPUT(auto t_end = std::chrono::high_resolution_clock::now();)
TIMING_OUTPUT(std::cout << "copying property named to named with different name took " << std::chrono::duration_cast<std::chrono::milliseconds>(t_end-t_start).count() << "ms" << std::endl;)
prop1.set_range(mesh_.vertices(), 0);
......@@ -378,9 +378,9 @@ TEST_F(OpenMeshPropertyManager, property_copying_same_mesh) {
EXPECT_EQ(prop1[OpenMesh::VertexHandle(0)], -13) << "Property not copied correctly";
EXPECT_EQ(prop2[OpenMesh::VertexHandle(0)], -13) << "Property not copied correctly";
auto t_start = std::chrono::high_resolution_clock::now();
TIMING_OUTPUT(auto t_start = std::chrono::high_resolution_clock::now();)
prop2 = prop1; // this should be a no op
auto t_end = std::chrono::high_resolution_clock::now();
TIMING_OUTPUT(auto t_end = std::chrono::high_resolution_clock::now();)
TIMING_OUTPUT(std::cout << "copying property named to named with same name took " << std::chrono::duration_cast<std::chrono::milliseconds>(t_end-t_start).count() << "ms" << std::endl;)
EXPECT_EQ(prop1[OpenMesh::VertexHandle(0)], -13) << "Property not copied correctly";
......@@ -423,9 +423,9 @@ TEST_F(OpenMeshPropertyManager, property_moving_same_mesh) {
EXPECT_EQ(prop2[OpenMesh::VertexHandle(0)], 0) << "Property not initialized correctly";
auto t_start = std::chrono::high_resolution_clock::now();
TIMING_OUTPUT(auto t_start = std::chrono::high_resolution_clock::now();)
prop2 = std::move(prop1); // this should be cheap
auto t_end = std::chrono::high_resolution_clock::now();
TIMING_OUTPUT(auto t_end = std::chrono::high_resolution_clock::now();)
TIMING_OUTPUT(std::cout << "moving property temporary to temporary took " << std::chrono::duration_cast<std::chrono::milliseconds>(t_end-t_start).count() << "ms" << std::endl;)
EXPECT_FALSE(prop1.isValid()) << "prop1 not invalidated after moving";
......@@ -445,9 +445,9 @@ TEST_F(OpenMeshPropertyManager, property_moving_same_mesh) {
EXPECT_EQ(prop2[OpenMesh::VertexHandle(0)], 0) << "Property not initialized correctly";
auto t_start = std::chrono::high_resolution_clock::now();
TIMING_OUTPUT(auto t_start = std::chrono::high_resolution_clock::now();)
prop2 = std::move(prop1);
auto t_end = std::chrono::high_resolution_clock::now();
TIMING_OUTPUT(auto t_end = std::chrono::high_resolution_clock::now();)
TIMING_OUTPUT(std::cout << "moving property temporary to named took " << std::chrono::duration_cast<std::chrono::milliseconds>(t_end-t_start).count() << "ms" << std::endl;)
EXPECT_FALSE(prop1.isValid()) << "prop1 not invalidated after moving";
......@@ -468,9 +468,9 @@ TEST_F(OpenMeshPropertyManager, property_moving_same_mesh) {
for (auto vh : mesh_.vertices())
prop1[vh] = vh.idx()*2-13;
auto t_start = std::chrono::high_resolution_clock::now();
TIMING_OUTPUT(auto t_start = std::chrono::high_resolution_clock::now();)
prop2 = std::move(prop1); // moving named properties will not invalidate the property and will copy the data
auto t_end = std::chrono::high_resolution_clock::now();
TIMING_OUTPUT(auto t_end = std::chrono::high_resolution_clock::now();)
TIMING_OUTPUT(std::cout << "moving property named to temporary took " << std::chrono::duration_cast<std::chrono::milliseconds>(t_end-t_start).count() << "ms" << std::endl;)
EXPECT_TRUE(prop1.isValid()) << "named prop1 should not be invalidated by moving";
......@@ -493,9 +493,9 @@ TEST_F(OpenMeshPropertyManager, property_moving_same_mesh) {
EXPECT_EQ(prop2[OpenMesh::VertexHandle(0)], 0) << "Property not initialized correctly";
auto t_start = std::chrono::high_resolution_clock::now();
TIMING_OUTPUT(auto t_start = std::chrono::high_resolution_clock::now();)
prop2 = std::move(prop1); // moving named properties will not invalidate the property and will copy the data
auto t_end = std::chrono::high_resolution_clock::now();
TIMING_OUTPUT(auto t_end = std::chrono::high_resolution_clock::now();)
TIMING_OUTPUT(std::cout << "moving property named to named with different name took " << std::chrono::duration_cast<std::chrono::milliseconds>(t_end-t_start).count() << "ms" << std::endl;)
EXPECT_TRUE(prop1.isValid()) << "named prop1 should not be invalidated by moving";
......@@ -516,9 +516,9 @@ TEST_F(OpenMeshPropertyManager, property_moving_same_mesh) {
EXPECT_EQ(prop1[OpenMesh::VertexHandle(0)], -13) << "Property not copied correctly";
EXPECT_EQ(prop2[OpenMesh::VertexHandle(0)], -13) << "Property not copied correctly";
auto t_start = std::chrono::high_resolution_clock::now();
TIMING_OUTPUT(auto t_start = std::chrono::high_resolution_clock::now();)
prop2 = std::move(prop1); // this should be a no op
auto t_end = std::chrono::high_resolution_clock::now();
TIMING_OUTPUT(auto t_end = std::chrono::high_resolution_clock::now();)
TIMING_OUTPUT(std::cout << "moving property named to named with same name took " << std::chrono::duration_cast<std::chrono::milliseconds>(t_end-t_start).count() << "ms" << std::endl;)
EXPECT_TRUE(prop1.isValid()) << "named prop1 should not be invalidated by moving";
......@@ -559,9 +559,9 @@ TEST_F(OpenMeshPropertyManager, property_copying_different_mesh) {
EXPECT_EQ(prop2[OpenMesh::VertexHandle(0)], 0) << "Property not initialized correctly";
auto t_start = std::chrono::high_resolution_clock::now();
TIMING_OUTPUT(auto t_start = std::chrono::high_resolution_clock::now();)
prop2 = prop1;
auto t_end = std::chrono::high_resolution_clock::now();
TIMING_OUTPUT(auto t_end = std::chrono::high_resolution_clock::now();)
TIMING_OUTPUT(std::cout << "copying property temporary to temporary took " << std::chrono::duration_cast<std::chrono::milliseconds>(t_end-t_start).count() << "ms" << std::endl;)
EXPECT_EQ(prop1[OpenMesh::VertexHandle(0)], -13) << "Temporary property got destroyed";
......@@ -584,9 +584,9 @@ TEST_F(OpenMeshPropertyManager, property_copying_different_mesh) {
EXPECT_EQ(prop2[OpenMesh::VertexHandle(0)], 0) << "Property not initialized correctly";
auto t_start = std::chrono::high_resolution_clock::now();
TIMING_OUTPUT(auto t_start = std::chrono::high_resolution_clock::now();)
prop2 = prop1;
auto t_end = std::chrono::high_resolution_clock::now();
TIMING_OUTPUT(auto t_end = std::chrono::high_resolution_clock::now();)
TIMING_OUTPUT(std::cout << "copying property temporary to named took " << std::chrono::duration_cast<std::chrono::milliseconds>(t_end-t_start).count() << "ms" << std::endl;)
EXPECT_EQ(prop1[OpenMesh::VertexHandle(0)], -13) << "Temporary property got destroyed";
......@@ -609,9 +609,9 @@ TEST_F(OpenMeshPropertyManager, property_copying_different_mesh) {
for (auto vh : mesh_.vertices())
prop1[vh] = vh.idx()*2-13;
auto t_start = std::chrono::high_resolution_clock::now();
TIMING_OUTPUT(auto t_start = std::chrono::high_resolution_clock::now();)
prop2 = prop1;
auto t_end = std::chrono::high_resolution_clock::now();
TIMING_OUTPUT(auto t_end = std::chrono::high_resolution_clock::now();)
TIMING_OUTPUT(std::cout << "copying property named to temporary took " << std::chrono::duration_cast<std::chrono::milliseconds>(t_end-t_start).count() << "ms" << std::endl;)
prop1.set_range(mesh_.vertices(), 0);
......@@ -632,9 +632,9 @@ TEST_F(OpenMeshPropertyManager, property_copying_different_mesh) {
EXPECT_EQ(prop2[OpenMesh::VertexHandle(0)], 0) << "Property not initialized correctly";
auto t_start = std::chrono::high_resolution_clock::now();
TIMING_OUTPUT(auto t_start = std::chrono::high_resolution_clock::now();)
prop2 = prop1;
auto t_end = std::chrono::high_resolution_clock::now();
TIMING_OUTPUT(auto t_end = std::chrono::high_resolution_clock::now();)
TIMING_OUTPUT(std::cout << "copying property named to named with different name took " << std::chrono::duration_cast<std::chrono::milliseconds>(t_end-t_start).count() << "ms" << std::endl;)
prop1.set_range(mesh_.vertices(), 0);
......@@ -652,9 +652,9 @@ TEST_F(OpenMeshPropertyManager, property_copying_different_mesh) {
EXPECT_EQ(prop1[OpenMesh::VertexHandle(0)], -13) << "Property not copied correctly";
auto t_start = std::chrono::high_resolution_clock::now();
TIMING_OUTPUT(auto t_start = std::chrono::high_resolution_clock::now();)
prop2 = prop1; // this should be a no op
auto t_end = std::chrono::high_resolution_clock::now();
TIMING_OUTPUT(auto t_end = std::chrono::high_resolution_clock::now();)
TIMING_OUTPUT(std::cout << "copying property named to named with same name took " << std::chrono::duration_cast<std::chrono::milliseconds>(t_end-t_start).count() << "ms" << std::endl;)
EXPECT_EQ(prop1[OpenMesh::VertexHandle(0)], -13) << "Property not copied correctly";
......@@ -693,9 +693,9 @@ TEST_F(OpenMeshPropertyManager, property_moving_different_mesh) {
EXPECT_EQ(prop2[OpenMesh::VertexHandle(0)], 0) << "Property not initialized correctly";
auto t_start = std::chrono::high_resolution_clock::now();
TIMING_OUTPUT(auto t_start = std::chrono::high_resolution_clock::now();)
prop2 = std::move(prop1); // this should be cheap
auto t_end = std::chrono::high_resolution_clock::now();
TIMING_OUTPUT(auto t_end = std::chrono::high_resolution_clock::now();)
TIMING_OUTPUT(std::cout << "moving property temporary to temporary took " << std::chrono::duration_cast<std::chrono::milliseconds>(t_end-t_start).count() << "ms" << std::endl;)
EXPECT_FALSE(prop1.isValid()) << "prop1 not invalidated after moving";
......@@ -716,9 +716,9 @@ TEST_F(OpenMeshPropertyManager, property_moving_different_mesh) {
EXPECT_EQ(prop2[OpenMesh::VertexHandle(0)], 0) << "Property not initialized correctly";
auto t_start = std::chrono::high_resolution_clock::now();
TIMING_OUTPUT(auto t_start = std::chrono::high_resolution_clock::now();)
prop2 = std::move(prop1);
auto t_end = std::chrono::high_resolution_clock::now();
TIMING_OUTPUT(auto t_end = std::chrono::high_resolution_clock::now();)
TIMING_OUTPUT(std::cout << "moving property temporary to named took " << std::chrono::duration_cast<std::chrono::milliseconds>(t_end-t_start).count() << "ms" << std::endl;)
EXPECT_FALSE(prop1.isValid()) << "prop1 not invalidated after moving";
......@@ -739,9 +739,9 @@ TEST_F(OpenMeshPropertyManager, property_moving_different_mesh) {
for (auto vh : mesh_.vertices())
prop1[vh] = vh.idx()*2-13;
auto t_start = std::chrono::high_resolution_clock::now();
TIMING_OUTPUT(auto t_start = std::chrono::high_resolution_clock::now();)
prop2 = std::move(prop1); // moving named properties will not invalidate the property and will copy the data
auto t_end = std::chrono::high_resolution_clock::now();
TIMING_OUTPUT(auto t_end = std::chrono::high_resolution_clock::now();)
TIMING_OUTPUT(std::cout << "moving property named to temporary took " << std::chrono::duration_cast<std::chrono::milliseconds>(t_end-t_start).count() << "ms" << std::endl;)
EXPECT_TRUE(prop1.isValid()) << "named prop1 should not be invalidated by moving";
......@@ -764,9 +764,9 @@ TEST_F(OpenMeshPropertyManager, property_moving_different_mesh) {
EXPECT_EQ(prop2[OpenMesh::VertexHandle(0)], 0) << "Property not initialized correctly";
auto t_start = std::chrono::high_resolution_clock::now();
TIMING_OUTPUT(auto t_start = std::chrono::high_resolution_clock::now();)
prop2 = std::move(prop1); // moving named properties will not invalidate the property and will copy the data
auto t_end = std::chrono::high_resolution_clock::now();
TIMING_OUTPUT(auto t_end = std::chrono::high_resolution_clock::now();)
TIMING_OUTPUT(std::cout << "moving property named to named with different name took " << std::chrono::duration_cast<std::chrono::milliseconds>(t_end-t_start).count() << "ms" << std::endl;)
EXPECT_TRUE(prop1.isValid()) << "named prop1 should not be invalidated by moving";
......@@ -789,9 +789,9 @@ TEST_F(OpenMeshPropertyManager, property_moving_different_mesh) {
EXPECT_EQ(prop1[OpenMesh::VertexHandle(0)], -13) << "Property not copied correctly";
auto t_start = std::chrono::high_resolution_clock::now();
TIMING_OUTPUT(auto t_start = std::chrono::high_resolution_clock::now();)
prop2 = std::move(prop1); // should copy
auto t_end = std::chrono::high_resolution_clock::now();
TIMING_OUTPUT(auto t_end = std::chrono::high_resolution_clock::now();)
TIMING_OUTPUT(std::cout << "moving property named to named with same name took " << std::chrono::duration_cast<std::chrono::milliseconds>(t_end-t_start).count() << "ms" << std::endl;)
EXPECT_TRUE(prop1.isValid()) << "named prop1 should not be invalidated by moving";
......@@ -840,13 +840,13 @@ TEST_F(OpenMeshPropertyManager, temporary_property_on_const_mesh) {
OpenMesh::VProp<int> get_id_prop(const OpenMesh::PolyConnectivity& mesh)
{
auto t_start = std::chrono::high_resolution_clock::now();
TIMING_OUTPUT(auto t_start = std::chrono::high_resolution_clock::now();)
auto id_prop = OpenMesh::VProp<int>(mesh);
for (auto vh : mesh.vertices())
id_prop(vh) = vh.idx();
auto t_end = std::chrono::high_resolution_clock::now();
TIMING_OUTPUT(auto t_end = std::chrono::high_resolution_clock::now();)
TIMING_OUTPUT(std::cout << "Time spend in function: " << std::chrono::duration_cast<std::chrono::milliseconds>(t_end-t_start).count() << "ms" << std::endl;)
return id_prop;
......@@ -857,9 +857,9 @@ TEST_F(OpenMeshPropertyManager, return_property_from_function) {
for (int i = 0; i < N_VERTICES_TIMING; ++i)
mesh_.add_vertex(Mesh::Point());
auto t_start = std::chrono::high_resolution_clock::now();
TIMING_OUTPUT(auto t_start = std::chrono::high_resolution_clock::now();)
auto id_p = get_id_prop(mesh_);
auto t_end = std::chrono::high_resolution_clock::now();
TIMING_OUTPUT(auto t_end = std::chrono::high_resolution_clock::now();)
TIMING_OUTPUT(std::cout << "Time spend around function " << std::chrono::duration_cast<std::chrono::milliseconds>(t_end-t_start).count() << "ms" << std::endl;)
for (auto vh : mesh_.vertices())
......
......@@ -469,9 +469,9 @@ TEST_F(OpenMeshSmartHandles, MixOldAndNew)
for (OpenMesh::SmartHalfedgeHandle heh : mesh_.halfedges())
{
heh = mesh_.opposite_halfedge_handle(heh);
OpenMesh::SmartEdgeHandle eh = OpenMesh::PolyConnectivity::s_edge_handle(heh);
OpenMesh::SmartEdgeHandle eh2 = mesh_.edge_handle(heh);
OpenMesh::SmartFaceHandle fh = mesh_.face_handle(heh);
EXPECT_TRUE((std::is_same<OpenMesh::SmartEdgeHandle, decltype(OpenMesh::PolyConnectivity::s_edge_handle(heh))>::value));
EXPECT_TRUE((std::is_same<OpenMesh::SmartEdgeHandle, decltype(mesh_.edge_handle(heh))>::value));
EXPECT_TRUE((std::is_same<OpenMesh::SmartFaceHandle, decltype(mesh_.face_handle(heh))>::value));
}
}
......@@ -552,10 +552,11 @@ TEST(OpenMeshSmartHandlesNoFixture, SplitTriMesh)
auto p = (MyMesh::Point());
OpenMesh::SmartVertexHandle vh = mesh.split(fh, p);
OpenMesh::SmartEdgeHandle eh = fh.halfedge().edge();
OpenMesh::SmartVertexHandle vh2 = mesh.split(eh, p);
EXPECT_NE(vh.idx(), vh2.idx()) << "This was only intended to fix an unused variable warning but cool that it caugth an actual error now";
}
......
......@@ -225,12 +225,12 @@ TEST_F(OpenMeshSmartRanges, ToVector)
auto tri_uvs = fh.halfedges().to_vector(uvs);
auto heh_handles = fh.halfedges().to_vector();
for (auto heh : heh_handles)
auto n = heh.next();
heh.next();
}
auto vertex_vec = mesh_.vertices().to_vector();
for (auto vh : vertex_vec)
auto heh = vh.out();
vh.out();
}
/* Test to array
......@@ -244,8 +244,8 @@ TEST_F(OpenMeshSmartRanges, ToArray)
for (auto fh : mesh_.faces())
{
auto tri_uvs = fh.halfedges().to_array<3>(uvs);
auto heh_handles = fh.halfedges().to_array<3>();
fh.halfedges().to_array<3>(uvs);
fh.halfedges().to_array<3>();
}
}
......@@ -263,7 +263,7 @@ TEST_F(OpenMeshSmartRanges, BoundingBox)
auto bb_min = mesh_.vertices().min(myPos);
auto bb_max = mesh_.vertices().max(myPos);
auto bb = mesh_.vertices().minmax(myPos);
mesh_.vertices().minmax(myPos);
EXPECT_LT(norm(bb_min - OpenMesh::Vec3f(-1,-1,-1)), 0.000001) << "Bounding box minimum seems off";
EXPECT_LT(norm(bb_max - OpenMesh::Vec3f( 1, 1, 1)), 0.000001) << "Bounding box maximum seems off";
......@@ -275,8 +275,8 @@ TEST_F(OpenMeshSmartRanges, BoundingBox)
for (auto fh : mesh_.faces())
{
auto uv_bb_min = fh.halfedges().min(uvs);
auto uv_bb_max = fh.halfedges().max(uvs);
fh.halfedges().min(uvs);
fh.halfedges().max(uvs);
}
}
......
......@@ -127,7 +127,7 @@ TEST_F(OpenMeshSplitEdgeCopyPolyMesh, SplitEdgeCopyPolymesh) {
face_vhandles.push_back(vhandle[2]);
face_vhandles.push_back(vhandle[3]);
PolyMesh::FaceHandle fh = mesh_.add_face(face_vhandles);
mesh_.add_face(face_vhandles);
PolyMesh::EdgeHandle eh = *mesh_.edges_begin();
// Test setup:
......
......@@ -904,12 +904,14 @@ TEST_F(OpenMeshIterators, RangeIterators) {
int count_faces_range = 0;
for (auto fh : mesh_.faces())
++count_faces_range;
if (fh.is_valid()) // not actually necessary but fixes unused variable warning
++count_faces_range;
EXPECT_EQ(1, count_faces_range) << "Wrong number of visited faces.";
int count_faces_range_all = 0;
for (auto fh : mesh_.all_faces())
++count_faces_range_all;
if (fh.is_valid()) // not actually necessary but fixes unused variable warning
++count_faces_range_all;
EXPECT_EQ(2, count_faces_range_all) << "Wrong number of visited faces.";
......@@ -927,12 +929,14 @@ TEST_F(OpenMeshIterators, RangeIterators) {
int count_edges_range = 0;
for (auto eh : mesh_.edges())
++count_edges_range;
if (eh.is_valid()) // not actually necessary but fixes unused variable warning
++count_edges_range;
EXPECT_EQ(3, count_edges_range) << "Wrong number of visited edges.";
int count_edges_range_all = 0;
for (auto eh : mesh_.all_edges())
++count_edges_range_all;
if (eh.is_valid()) // not actually necessary but fixes unused variable warning
++count_edges_range_all;
EXPECT_EQ(5, count_edges_range_all) << "Wrong number of visited edges.";
......@@ -950,12 +954,14 @@ TEST_F(OpenMeshIterators, RangeIterators) {
int count_halfedges_range = 0;
for (auto heh : mesh_.halfedges())
++count_halfedges_range;
if (heh.is_valid()) // not actually necessary but fixes unused variable warning
++count_halfedges_range;
EXPECT_EQ(6, count_halfedges_range) << "Wrong number of visited halfedges.";
int count_halfedges_range_all = 0;
for (auto heh : mesh_.all_halfedges())
++count_halfedges_range_all;
if (heh.is_valid()) // not actually necessary but fixes unused variable warning
++count_halfedges_range_all;
EXPECT_EQ(10, count_halfedges_range_all) << "Wrong number of visited halfedges.";
......@@ -973,12 +979,14 @@ TEST_F(OpenMeshIterators, RangeIterators) {
int count_vertices_range = 0;
for (auto vh : mesh_.vertices())
++count_vertices_range;
if (vh.is_valid()) // not actually necessary but fixes unused variable warning
++count_vertices_range;
EXPECT_EQ(3, count_vertices_range) << "Wrong number of visited vertices.";
int count_vertices_range_all = 0;
for (auto vh : mesh_.all_vertices())
++count_vertices_range_all;
if (vh.is_valid()) // not actually necessary but fixes unused variable warning
++count_vertices_range_all;
EXPECT_EQ(4, count_vertices_range_all) << "Wrong number of visited vertices.";
......
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