Skip to main content
summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAlena Laskavaia2010-05-24 22:16:11 -0400
committerAlena Laskavaia2010-05-24 22:16:11 -0400
commit3ec7ac60faf78569c1550ca5cb85b1deb29278fd (patch)
tree13c361ac52cfab280fcbc2e42ac234e73d32d6fa /codan/org.eclipse.cdt.codan.ui.cfgview
parent6a49ab36dda815d12ed681325b8e9a2f9ce4241e (diff)
downloadorg.eclipse.cdt-3ec7ac60faf78569c1550ca5cb85b1deb29278fd.tar.gz
org.eclipse.cdt-3ec7ac60faf78569c1550ca5cb85b1deb29278fd.tar.xz
org.eclipse.cdt-3ec7ac60faf78569c1550ca5cb85b1deb29278fd.zip
Clean up interfaces for control flow graph
Diffstat (limited to 'codan/org.eclipse.cdt.codan.ui.cfgview')
-rw-r--r--codan/org.eclipse.cdt.codan.ui.cfgview/src/org/eclipse/cdt/codan/ui/cfgview/views/ControlFlowGraphView.java13
1 files changed, 5 insertions, 8 deletions
diff --git a/codan/org.eclipse.cdt.codan.ui.cfgview/src/org/eclipse/cdt/codan/ui/cfgview/views/ControlFlowGraphView.java b/codan/org.eclipse.cdt.codan.ui.cfgview/src/org/eclipse/cdt/codan/ui/cfgview/views/ControlFlowGraphView.java
index 71f51bbaef..ccb391c52e 100644
--- a/codan/org.eclipse.cdt.codan.ui.cfgview/src/org/eclipse/cdt/codan/ui/cfgview/views/ControlFlowGraphView.java
+++ b/codan/org.eclipse.cdt.codan.ui.cfgview/src/org/eclipse/cdt/codan/ui/cfgview/views/ControlFlowGraphView.java
@@ -2,7 +2,6 @@ package org.eclipse.cdt.codan.ui.cfgview.views;
import java.util.ArrayList;
import java.util.Collection;
-import java.util.Iterator;
import org.eclipse.cdt.codan.core.cxx.internal.model.cfg.ControlFlowGraphBuilder;
import org.eclipse.cdt.codan.core.cxx.internal.model.cfg.CxxControlFlowGraph;
@@ -122,13 +121,11 @@ public class ControlFlowGraphView extends ViewPart {
return blocks.toArray();
} else if (parent instanceof IDecisionNode) {
ArrayList blocks = new ArrayList();
- Iterator<IBasicBlock> iter = ((IDecisionNode) parent)
- .getOutgoingIterator();
- if (iter.hasNext()) {
- for (; iter.hasNext();) {
- IBasicBlock arc = iter.next();
- blocks.add(arc);
- }
+ IBasicBlock[] outgoingNodes = ((IDecisionNode) parent)
+ .getOutgoingNodes();
+ for (int i = 0; i < outgoingNodes.length; i++) {
+ IBasicBlock arc= outgoingNodes[i];
+ blocks.add(arc);
}
blocks.add(((IDecisionNode) parent).getMergeNode());
return blocks.toArray();

Back to the top