From dab7b668c1633066cade07c0f491bb85ceb297cf Mon Sep 17 00:00:00 2001
From: Franjo Juretic <franjo.juretic@c-fields.com>
Date: Mon, 13 Jul 2015 22:47:30 +0200
Subject: [PATCH] Cleanup of triSurfAddressing

---
 .../utilities/meshes/triSurf/triSurfAddressing.C  | 15 ++++-----------
 1 file changed, 4 insertions(+), 11 deletions(-)

diff --git a/meshLibrary/utilities/meshes/triSurf/triSurfAddressing.C b/meshLibrary/utilities/meshes/triSurf/triSurfAddressing.C
index 08607640..6cb1d9b0 100644
--- a/meshLibrary/utilities/meshes/triSurf/triSurfAddressing.C
+++ b/meshLibrary/utilities/meshes/triSurf/triSurfAddressing.C
@@ -81,28 +81,22 @@ void triSurfAddressing::calculateEdges() const
                 const label triI = pFacets(pI, pfI);
                 const labelledTri& tri = facets_[triI];
 
-                label pos(-1);
                 forAll(tri, i)
                 {
                     if( tri[i] == pI )
                     {
-                        pos = i;
-
-
-                        if( tri[(pos+1)%3] >= pI )
+                        if( tri[(i+1)%3] >= pI )
                             edgesAtPoint.insert
                             (
-                                std::make_pair(pI, tri[(pos+1)%3])
+                                std::make_pair(pI, tri[(i+1)%3])
                             );
-                        if( tri[(pos+2)%3] >= pI )
+                        if( tri[(i+2)%3] >= pI )
                             edgesAtPoint.insert
                             (
-                                std::make_pair(pI, tri[(pos+2)%3])
+                                std::make_pair(pI, tri[(i+2)%3])
                             );
                     }
                 }
-
-
             }
 
             std::set<std::pair<label, label> >::const_iterator it;
@@ -119,7 +113,6 @@ void triSurfAddressing::calculateEdges() const
         # endif
         nEdgesForThread[threadI] = edgesHelper.size();
 
-
         # ifdef USE_OMP
         # pragma omp critical
         # endif
-- 
GitLab