From 089697986cb4490dd588490795160f3897b0233d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jan=20M=C3=B6bius?= Date: Mon, 23 Jan 2012 14:35:06 +0000 Subject: [PATCH] Try to fix build error on windows git-svn-id: http://www.openmesh.org/svnrepo/OpenMesh/trunk@524 fdac6126-5c0c-442c-9429-916003d36597 --- .../Tools/Subdivider/Uniform/LongestEdgeT.hh | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/src/OpenMesh/Tools/Subdivider/Uniform/LongestEdgeT.hh b/src/OpenMesh/Tools/Subdivider/Uniform/LongestEdgeT.hh index de172ca4..73345701 100644 --- a/src/OpenMesh/Tools/Subdivider/Uniform/LongestEdgeT.hh +++ b/src/OpenMesh/Tools/Subdivider/Uniform/LongestEdgeT.hh @@ -77,14 +77,13 @@ namespace Uniform { // BEGIN_NS_UNIFORM template class CompareLengthFunction { - public: + public: - bool operator()( const std::pair< typename MeshType::EdgeHandle, RealType >& t1, const std::pair< typename MeshType::EdgeHandle, RealType >& t2) // Returns true if t1 is earlier than t2 + typedef std::pair queueElement; + + bool operator()(const queueElement& t1, const queueElement& t2) // Returns true if t1 is smaller than t2 { - if (t1.second < t2.second) - return true; - else - return false; + return (t1.second < t2.second); } }; @@ -107,6 +106,8 @@ public: typedef std::vector< std::vector > weights_t; typedef std::vector weight_t; + typedef std::pair< typename mesh_t::EdgeHandle, real_t > queueElement; + public: @@ -148,7 +149,6 @@ protected: bool subdivide( MeshType& _m, size_t _n , const bool _update_points = true) { - typedef std::pair< typename mesh_t::EdgeHandle, real_t > queueElement; // Sorted queue containing all edges sorted by their decreasing length std::priority_queue< queueElement, std::vector< queueElement > , CompareLengthFunction< typename mesh_t::EdgeHandle, real_t > > queue;