From cb16ac26d6705009c2e17f0cbfde4b9bc8015409 Mon Sep 17 00:00:00 2001 From: Hans-Christian Ebke Date: Thu, 8 Aug 2013 10:15:53 +0000 Subject: [PATCH] Removed unnecessary parameters from circulator members. git-svn-id: http://www.openmesh.org/svnrepo/OpenMesh/trunk@916 fdac6126-5c0c-442c-9429-916003d36597 --- src/OpenMesh/Core/Mesh/CirculatorsT.hh | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/src/OpenMesh/Core/Mesh/CirculatorsT.hh b/src/OpenMesh/Core/Mesh/CirculatorsT.hh index fe75cf12..8bc3835b 100644 --- a/src/OpenMesh/Core/Mesh/CirculatorsT.hh +++ b/src/OpenMesh/Core/Mesh/CirculatorsT.hh @@ -103,7 +103,7 @@ class GenericCirculator_DereferenciabilityCheckT { template class GenericCirculator_DereferenciabilityCheckT { public: - inline static bool isDereferenciable(const Mesh *mesh, const typename Mesh::HalfedgeHandle &heh, const typename Mesh::HalfedgeHandle &start, const int &lap_counter) { + inline static bool isDereferenciable(const Mesh *mesh, const typename Mesh::HalfedgeHandle &heh) { return mesh->face_handle(mesh->opposite_halfedge_handle(heh)).is_valid(); } }; @@ -111,7 +111,7 @@ class GenericCirculator_DereferenciabilityCheckT class GenericCirculator_DereferenciabilityCheckT { public: - inline static bool isDereferenciable(const Mesh *mesh, const typename Mesh::HalfedgeHandle &heh, const typename Mesh::HalfedgeHandle &start, const int &lap_counter) { + inline static bool isDereferenciable(const Mesh *mesh, const typename Mesh::HalfedgeHandle &heh) { return mesh->face_handle(heh).is_valid(); } }; @@ -119,10 +119,10 @@ class GenericCirculator_DereferenciabilityCheckT class GenericCirculator_ValueHandleFnsT { public: - inline static bool is_valid(const Mesh *mesh, const typename Mesh::HalfedgeHandle &heh, const typename Mesh::HalfedgeHandle &start, const int &lap_counter) { + inline static bool is_valid(const typename Mesh::HalfedgeHandle &heh, const typename Mesh::HalfedgeHandle &start, const int &lap_counter) { return heh.is_valid() && ((start != heh) || (lap_counter == 0)); } - inline static void init(const Mesh *mesh, typename Mesh::HalfedgeHandle &heh, typename Mesh::HalfedgeHandle &start, int &lap_counter) {}; + inline static void init(const Mesh*, typename Mesh::HalfedgeHandle&, typename Mesh::HalfedgeHandle&, int&) {}; inline static void increment(const Mesh *mesh, typename Mesh::HalfedgeHandle &heh, typename Mesh::HalfedgeHandle &start, int &lap_counter) { GenericCirculator_CenterEntityFnsT::increment(mesh, heh, start, lap_counter); } @@ -136,22 +136,22 @@ class GenericCirculator_ValueHandleFnsT GenericCirculator_DereferenciabilityCheck; - inline static bool is_valid(const Mesh *mesh, const typename Mesh::HalfedgeHandle &heh, const typename Mesh::HalfedgeHandle &start, const int &lap_counter) { + inline static bool is_valid(const typename Mesh::HalfedgeHandle &heh, const typename Mesh::HalfedgeHandle &start, const int &lap_counter) { return heh.is_valid() && ((start != heh) || (lap_counter == 0)); } inline static void init(const Mesh *mesh, typename Mesh::HalfedgeHandle &heh, typename Mesh::HalfedgeHandle &start, int &lap_counter) { - if (heh.is_valid() && !GenericCirculator_DereferenciabilityCheck::isDereferenciable(mesh, heh, start, lap_counter) && lap_counter == 0) + if (heh.is_valid() && !GenericCirculator_DereferenciabilityCheck::isDereferenciable(mesh, heh) && lap_counter == 0) increment(mesh, heh, start, lap_counter); }; inline static void increment(const Mesh *mesh, typename Mesh::HalfedgeHandle &heh, typename Mesh::HalfedgeHandle &start, int &lap_counter) { do { GenericCirculator_CenterEntityFnsT::increment(mesh, heh, start, lap_counter); - } while (is_valid(mesh, heh, start, lap_counter) && !GenericCirculator_DereferenciabilityCheck::isDereferenciable(mesh, heh, start, lap_counter)); + } while (is_valid(heh, start, lap_counter) && !GenericCirculator_DereferenciabilityCheck::isDereferenciable(mesh, heh)); } inline static void decrement(const Mesh *mesh, typename Mesh::HalfedgeHandle &heh, typename Mesh::HalfedgeHandle &start, int &lap_counter) { do { GenericCirculator_CenterEntityFnsT::decrement(mesh, heh, start, lap_counter); - } while (is_valid(mesh, heh, start, lap_counter) && !GenericCirculator_DereferenciabilityCheck::isDereferenciable(mesh, heh, start, lap_counter)); + } while (is_valid(heh, start, lap_counter) && !GenericCirculator_DereferenciabilityCheck::isDereferenciable(mesh, heh)); } }; @@ -310,7 +310,7 @@ class GenericCirculatorT : protected GenericCirculatorBaseT { } bool is_valid() const { - return GenericCirculator_ValueHandleFns::is_valid(this->mesh_, this->heh_, this->start_, this->lap_counter_); + return GenericCirculator_ValueHandleFns::is_valid(this->heh_, this->start_, this->lap_counter_); } //DEPRECATED("current_halfedge_handle() is an implementation detail and should not be accessed from outside the iterator class.")