Merge pull request #75 from IasonManolas/IndexConstness_devel

Added constness specifier to Index function.
This commit is contained in:
Luigi Malomo 2020-02-06 12:17:27 +01:00 committed by GitHub
commit 665f8463f8
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 10 additions and 10 deletions

View File

@ -34,27 +34,27 @@ namespace tri {
*/ */
template<class MeshType> template<class MeshType>
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<class MeshType> template<class MeshType>
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<class MeshType> template<class MeshType>
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<class MeshType> template<class MeshType>
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 <class MeshType> template <class MeshType>
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<class MeshType> template<class MeshType>
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<class MeshType> template<class MeshType>
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<class MeshType> template<class MeshType>
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<class MeshType> template<class MeshType>
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 <class MeshType> template <class MeshType>
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<class MeshType> template<class MeshType>