From 2bb80853553c84afe9031fa09748c3ef171b716f Mon Sep 17 00:00:00 2001 From: Stefen Guzik <guzik2@llnl.gov> Date: Tue, 21 Nov 2006 07:53:02 +0000 Subject: [PATCH] new != operator removed some unused functors --- Geo/MEdge.h | 36 ++++++++---------------------------- 1 file changed, 8 insertions(+), 28 deletions(-) diff --git a/Geo/MEdge.h b/Geo/MEdge.h index 087dcd08d5..344f81304e 100644 --- a/Geo/MEdge.h +++ b/Geo/MEdge.h @@ -65,6 +65,14 @@ class MEdge { } }; +//--Operators for comparing edges + +inline bool operator!=(const MEdge &e1, const MEdge &e2) +{ + return (e1.getMinVertex() != e2.getMinVertex() || + e1.getMaxVertex() != e2.getMaxVertex()); +} + //--The following function objects compare the addresses of the mesh vertices. //--Equal, Less, and a Hash are defined. @@ -76,14 +84,6 @@ struct Equal_Edge : public std::binary_function<MEdge, MEdge, bool> { } }; -struct Equal_EdgePtr : public std::binary_function<MEdge*, MEdge*, bool> { - bool operator()(const MEdge *const e1, const MEdge *const e2) const - { - return (e1->getMinVertex() == e2->getMinVertex() && - e1->getMaxVertex() == e2->getMaxVertex()); - } -}; - struct Less_Edge : public std::binary_function<MEdge, MEdge, bool> { bool operator()(const MEdge &e1, const MEdge &e2) const { @@ -94,16 +94,6 @@ struct Less_Edge : public std::binary_function<MEdge, MEdge, bool> { } }; -struct Less_EdgePtr : public std::binary_function<MEdge*, MEdge*, bool> { - bool operator()(const MEdge *const e1, const MEdge *const e2) const - { - if(e1->getMinVertex() < e2->getMinVertex()) return true; - if(e1->getMinVertex() > e2->getMinVertex()) return false; - if(e1->getMaxVertex() < e2->getMaxVertex()) return true; - return false; - } -}; - struct Hash_Edge : public std::unary_function<MEdge, size_t> { size_t operator()(const MEdge &e) const { @@ -114,14 +104,4 @@ struct Hash_Edge : public std::unary_function<MEdge, size_t> { } }; -struct Hash_EdgePtr : public std::unary_function<MEdge*, size_t> { - size_t operator()(const MEdge *const e) const - { - const MVertex *v[2]; - v[0] = e->getMinVertex(); - v[1] = e->getMaxVertex(); - return HashFNV1a<sizeof(MVertex*[2])>::eval(v); - } -}; - #endif -- GitLab