From b135803c865ccde58e82adb5a0fc8712fa16e3ef Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jan=20M=C3=B6bius?= Date: Mon, 16 Apr 2018 10:03:10 +0200 Subject: [PATCH] Removed unary_function from hash --- src/OpenMesh/Core/Mesh/Handles.hh | 18 +++++++++++++----- 1 file changed, 13 insertions(+), 5 deletions(-) diff --git a/src/OpenMesh/Core/Mesh/Handles.hh b/src/OpenMesh/Core/Mesh/Handles.hh index 6cbb8ac4..68ac1d7e 100644 --- a/src/OpenMesh/Core/Mesh/Handles.hh +++ b/src/OpenMesh/Core/Mesh/Handles.hh @@ -165,8 +165,9 @@ namespace std { template <> struct hash - : public std::unary_function { + typedef OpenMesh::BaseHandle argument_type; + typedef std::size_t result_type; std::size_t operator()(const OpenMesh::BaseHandle& h) const { @@ -176,8 +177,9 @@ struct hash template <> struct hash - : public std::unary_function { + typedef OpenMesh::VertexHandle argument_type; + typedef std::size_t result_type; std::size_t operator()(const OpenMesh::VertexHandle& h) const { @@ -187,9 +189,11 @@ struct hash template <> struct hash - : public std::unary_function { + typedef OpenMesh::HalfedgeHandle argument_type; + typedef std::size_t result_type; + std::size_t operator()(const OpenMesh::HalfedgeHandle& h) const { return h.idx(); @@ -198,9 +202,11 @@ struct hash template <> struct hash - : public std::unary_function { + typedef OpenMesh::EdgeHandle argument_type; + typedef std::size_t result_type; + std::size_t operator()(const OpenMesh::EdgeHandle& h) const { return h.idx(); @@ -209,9 +215,11 @@ struct hash template <> struct hash - : public std::unary_function { + typedef OpenMesh::FaceHandle argument_type; + typedef std::size_t result_type; + std::size_t operator()(const OpenMesh::FaceHandle& h) const { return h.idx();