From 9f647f24609651f126f490277b16433b16206ffd Mon Sep 17 00:00:00 2001 From: granzuglia Date: Thu, 25 Sep 2014 17:11:45 +0000 Subject: [PATCH] - added missing cast causing compiler error --- vcg/complex/algorithms/update/quality.h | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/vcg/complex/algorithms/update/quality.h b/vcg/complex/algorithms/update/quality.h index 1eed417f..e8c1f0d9 100644 --- a/vcg/complex/algorithms/update/quality.h +++ b/vcg/complex/algorithms/update/quality.h @@ -73,8 +73,9 @@ static void VertexClamp(MeshType &m, typename MeshType::ScalarType qmax) { tri::RequirePerVertexQuality(m); - for(VertexIterator vi=m.vert.begin();vi!=m.vert.end();++vi) if(!(*vi).IsD()) - (*vi).Q()=min(qmax, max(qmin,(*vi).Q())); + for(VertexIterator vi=m.vert.begin();vi!=m.vert.end();++vi) + if(!(*vi).IsD()) + (*vi).Q()=std::min(qmax, std::max(qmin,typename MeshType::ScalarType((*vi).Q()))); } /** Normalize the vertex quality so that it fits in the specified range.