From 7e6c7c71b321dce1c5e2ad7c2166f0bc46ed29c8 Mon Sep 17 00:00:00 2001 From: "T.Alderighi" Date: Wed, 11 Dec 2019 10:23:26 +0100 Subject: [PATCH] fix a bug that causing heap priority to be inconsistent after updating vertex quality [using windows runtime this would cause an assertion to fail] --- vcg/complex/algorithms/geodesic.h | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/vcg/complex/algorithms/geodesic.h b/vcg/complex/algorithms/geodesic.h index e5a438fe..db45cd2d 100644 --- a/vcg/complex/algorithms/geodesic.h +++ b/vcg/complex/algorithms/geodesic.h @@ -176,13 +176,14 @@ public: struct DIJKDist{ - DIJKDist(VertexPointer _v):v(_v){} + DIJKDist(VertexPointer _v):v(_v), q(_v->Q()){} VertexPointer v; + ScalarType q; bool operator < (const DIJKDist &o) const { - if( v->Q() != o.v->Q()) - return v->Q() > o.v->Q(); + if( q != o.q) + return q > o.q; return v Heap; tri::UnMarkAll(m); + tri::UnMarkAll(m); for(size_t i=0;i