diff options
author | Rami Santina <[email protected]> | 2011-05-21 17:49:08 +0300 |
---|---|---|
committer | Rami Santina <[email protected]> | 2011-05-21 17:49:08 +0300 |
commit | 5ea211cde39be9669d1f2f289abbba460398f82e (patch) | |
tree | 79a3db238a55faa6aebad7493e772065c69411b5 /src/jogl/classes/jogamp/graph/curve/tess/GraphVertex.java | |
parent | 9e599f84bc02ef2db63b6eb1cadfa33f56dddd66 (diff) |
Remove implicit for loops reduces temp objects
Diffstat (limited to 'src/jogl/classes/jogamp/graph/curve/tess/GraphVertex.java')
-rw-r--r-- | src/jogl/classes/jogamp/graph/curve/tess/GraphVertex.java | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/src/jogl/classes/jogamp/graph/curve/tess/GraphVertex.java b/src/jogl/classes/jogamp/graph/curve/tess/GraphVertex.java index 5efe57c28..52d02baa5 100644 --- a/src/jogl/classes/jogamp/graph/curve/tess/GraphVertex.java +++ b/src/jogl/classes/jogamp/graph/curve/tess/GraphVertex.java @@ -86,7 +86,8 @@ public class GraphVertex { } } public HEdge findNextEdge(GraphVertex nextVert){ - for(HEdge e:edges){ + for(int i=0; i<edges.size(); i++) { + HEdge e = edges.get(i); if(e.getNext().getGraphPoint() == nextVert){ return e; } @@ -94,7 +95,8 @@ public class GraphVertex { return null; } public HEdge findBoundEdge(){ - for(HEdge e:edges){ + for(int i=0; i<edges.size(); i++) { + HEdge e = edges.get(i); if((e.getType() == HEdge.BOUNDARY) || (e.getType() == HEdge.HOLE)){ return e; } @@ -102,7 +104,8 @@ public class GraphVertex { return null; } public HEdge findPrevEdge(GraphVertex prevVert){ - for(HEdge e:edges){ + for(int i=0; i<edges.size(); i++) { + HEdge e = edges.get(i); if(e.getPrev().getGraphPoint() == prevVert){ return e; } |