Commit 6603442b authored by Jan Möbius's avatar Jan Möbius

Merge branch 'fix_warnings' into 'master'

Fix warnings

See merge request !243
parents 6a6175ff debce64d
Pipeline #13206 passed with stages
in 203 minutes and 50 seconds
......@@ -59,7 +59,7 @@ namespace OpenMesh {
/// Base class for all handle types
class BaseHandle
class OPENMESHDLLEXPORT BaseHandle
{
public:
......@@ -117,35 +117,35 @@ inline std::ostream& operator<<(std::ostream& _os, const BaseHandle& _hnd)
/// Handle for a vertex entity
struct VertexHandle : public BaseHandle
struct OPENMESHDLLEXPORT VertexHandle : public BaseHandle
{
explicit VertexHandle(int _idx=-1) : BaseHandle(_idx) {}
};
/// Handle for a halfedge entity
struct HalfedgeHandle : public BaseHandle
struct OPENMESHDLLEXPORT HalfedgeHandle : public BaseHandle
{
explicit HalfedgeHandle(int _idx=-1) : BaseHandle(_idx) {}
};
/// Handle for a edge entity
struct EdgeHandle : public BaseHandle
struct OPENMESHDLLEXPORT EdgeHandle : public BaseHandle
{
explicit EdgeHandle(int _idx=-1) : BaseHandle(_idx) {}
};
/// Handle for a face entity
struct FaceHandle : public BaseHandle
struct OPENMESHDLLEXPORT FaceHandle : public BaseHandle
{
explicit FaceHandle(int _idx=-1) : BaseHandle(_idx) {}
};
/// Handle type for meshes to simplify some template programming
struct MeshHandle : public BaseHandle
struct OPENMESHDLLEXPORT MeshHandle : public BaseHandle
{
explicit MeshHandle(int _idx=-1) : BaseHandle(_idx) {}
};
......
......@@ -159,14 +159,14 @@ protected:
template <typename HandleT>
struct F
{
int operator()(HandleT ) { return 1; }
unsigned int operator()(HandleT ) { return 1; }
};
/* Test if smart ranges work
*/
TEST_F(OpenMeshSmartRanges, Sum)
{
auto one = [](OpenMesh::VertexHandle ) { return 1; };
auto one = [](OpenMesh::VertexHandle ) { return 1u; };
EXPECT_EQ(mesh_.vertices().sum(one), mesh_.n_vertices());
EXPECT_EQ(mesh_.vertices().sum(F<OpenMesh::VertexHandle>()), mesh_.n_vertices());
EXPECT_EQ(mesh_.halfedges().sum(F<OpenMesh::HalfedgeHandle>()), mesh_.n_halfedges());
......@@ -189,7 +189,7 @@ TEST_F(OpenMeshSmartRanges, Sum)
for (auto fh : mesh_.faces())
EXPECT_EQ(fh.edges().sum(F<OpenMesh::EdgeHandle>()), mesh_.valence(fh));
for (auto fh : mesh_.faces())
EXPECT_EQ(fh.faces().sum(F<OpenMesh::FaceHandle>()), 3);
EXPECT_EQ(fh.faces().sum(F<OpenMesh::FaceHandle>()), 3u);
}
......
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