From ab353c8dd0a0410cac11c4602b90bb79d6fd8ffe Mon Sep 17 00:00:00 2001 From: Max Lyon Date: Tue, 5 Nov 2019 15:29:11 +0100 Subject: [PATCH] Define a MeshHandle to simplify some template programming --- src/OpenMesh/Core/Mesh/Handles.hh | 9 +++++++++ src/OpenMesh/Core/Utils/Property.hh | 2 +- 2 files changed, 10 insertions(+), 1 deletion(-) diff --git a/src/OpenMesh/Core/Mesh/Handles.hh b/src/OpenMesh/Core/Mesh/Handles.hh index 0c8c21c4..4871996d 100644 --- a/src/OpenMesh/Core/Mesh/Handles.hh +++ b/src/OpenMesh/Core/Mesh/Handles.hh @@ -144,6 +144,15 @@ struct FaceHandle : public BaseHandle }; +/// Handle type for meshes to simplify some template programming +struct MeshHandle : public BaseHandle +{ + explicit MeshHandle(int _idx=-1) : BaseHandle(_idx) {} +}; + + + + //============================================================================= } // namespace OpenMesh //============================================================================= diff --git a/src/OpenMesh/Core/Utils/Property.hh b/src/OpenMesh/Core/Utils/Property.hh index fb97f81c..71e2f86f 100644 --- a/src/OpenMesh/Core/Utils/Property.hh +++ b/src/OpenMesh/Core/Utils/Property.hh @@ -545,7 +545,7 @@ struct MPropHandleT : public BasePropHandleT { typedef T Value; typedef T value_type; - typedef void Handle; + typedef MeshHandle Handle; explicit MPropHandleT(int _idx=-1) : BasePropHandleT(_idx) {} explicit MPropHandleT(const BasePropHandleT& _b) : BasePropHandleT(_b) {}