From a4936cfe8990a8c2112f6d693d66d91d72dfb246 Mon Sep 17 00:00:00 2001 From: Iason Date: Wed, 5 Feb 2020 17:35:15 +0100 Subject: [PATCH] Added constness specifier to Index function. --- vcg/complex/allocate.h | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/vcg/complex/allocate.h b/vcg/complex/allocate.h index c1691fd9..308305f9 100644 --- a/vcg/complex/allocate.h +++ b/vcg/complex/allocate.h @@ -34,27 +34,27 @@ namespace tri { */ template -size_t Index(MeshType &m, const typename MeshType::VertexType &v) {return &v-&*m.vert.begin();} +size_t Index(const MeshType &m, const typename MeshType::VertexType &v) {return &v-&*m.vert.begin();} template -size_t Index(MeshType &m, const typename MeshType::FaceType &f) {return &f-&*m.face.begin();} +size_t Index(const MeshType &m, const typename MeshType::FaceType &f) {return &f-&*m.face.begin();} template -size_t Index(MeshType &m, const typename MeshType::EdgeType &e) {return &e-&*m.edge.begin();} +size_t Index(const MeshType &m, const typename MeshType::EdgeType &e) {return &e-&*m.edge.begin();} template -size_t Index(MeshType &m, const typename MeshType::HEdgeType &h) {return &h-&*m.hedge.begin();} +size_t Index(const MeshType &m, const typename MeshType::HEdgeType &h) {return &h-&*m.hedge.begin();} template -size_t Index(MeshType &m, const typename MeshType::TetraType &t) { return &t - &*m.tetra.begin(); } +size_t Index(const MeshType &m, const typename MeshType::TetraType &t) { return &t - &*m.tetra.begin(); } template -size_t Index(MeshType &m, const typename MeshType::VertexType *vp) {return vp-&*m.vert.begin();} +size_t Index(const MeshType &m, const typename MeshType::VertexType *vp) {return vp-&*m.vert.begin();} template -size_t Index(MeshType &m, const typename MeshType::FaceType * fp) {return fp-&*m.face.begin();} +size_t Index(const MeshType &m, const typename MeshType::FaceType * fp) {return fp-&*m.face.begin();} template -size_t Index(MeshType &m, const typename MeshType::EdgeType* e) {return e-&*m.edge.begin();} +size_t Index(const MeshType &m, const typename MeshType::EdgeType* e) {return e-&*m.edge.begin();} template -size_t Index(MeshType &m, const typename MeshType::HEdgeType* h) {return h-&*m.hedge.begin();} +size_t Index(const MeshType &m, const typename MeshType::HEdgeType* h) {return h-&*m.hedge.begin();} template -size_t Index(MeshType &m, const typename MeshType::TetraType *t) { return t - &*m.tetra.begin(); } +size_t Index(const MeshType &m, const typename MeshType::TetraType *t) { return t - &*m.tetra.begin(); } template