From 2eebdd629f5b80f6822cd0dce0de7838f069e5e2 Mon Sep 17 00:00:00 2001 From: Max Lyon Date: Wed, 27 Nov 2019 13:27:39 +0100 Subject: [PATCH] reduce scope of variable --- src/OpenMesh/Tools/Decimater/ModAspectRatioT_impl.hh | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/OpenMesh/Tools/Decimater/ModAspectRatioT_impl.hh b/src/OpenMesh/Tools/Decimater/ModAspectRatioT_impl.hh index 8575b79c..eebb2cc3 100644 --- a/src/OpenMesh/Tools/Decimater/ModAspectRatioT_impl.hh +++ b/src/OpenMesh/Tools/Decimater/ModAspectRatioT_impl.hh @@ -133,16 +133,16 @@ template float ModAspectRatioT::collapse_priority(const CollapseInfo& _ci) { typename Mesh::VertexHandle v2, v3; typename Mesh::FaceHandle fh; - const typename Mesh::Point *p1(&_ci.p1), *p2, *p3; + const typename Mesh::Point* p1(&_ci.p1); typename Mesh::Scalar r0, r1, r0_min(1.0), r1_min(1.0); typename Mesh::ConstVertexOHalfedgeIter voh_it(mesh_, _ci.v0); v3 = mesh_.to_vertex_handle(*voh_it); - p3 = &mesh_.point(v3); + auto p3 = &mesh_.point(v3); while (voh_it.is_valid()) { v2 = v3; - p2 = p3; + auto p2 = p3; ++voh_it; v3 = mesh_.to_vertex_handle(*voh_it);