mirror of
https://git.huckle.dev/Huckles-Minecraft-Archive/jpexs-decompiler.git
synced 2026-05-25 10:46:29 +00:00
using HashSet in Graph.leadsTo
This commit is contained in:
@@ -19,6 +19,7 @@ package com.jpexs.decompiler.graph;
|
||||
import com.jpexs.decompiler.flash.BaseLocalData;
|
||||
import java.io.Serializable;
|
||||
import java.util.ArrayList;
|
||||
import java.util.HashSet;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
@@ -123,7 +124,7 @@ public class GraphPart implements Serializable {
|
||||
return time;
|
||||
}
|
||||
|
||||
private boolean leadsTo(BaseLocalData localData, Graph gr, GraphSource code, GraphPart part, List<GraphPart> visited, List<Loop> loops) throws InterruptedException {
|
||||
private boolean leadsTo(BaseLocalData localData, Graph gr, GraphSource code, GraphPart part, HashSet<GraphPart> visited, List<Loop> loops) throws InterruptedException {
|
||||
if (Thread.currentThread().isInterrupted()) {
|
||||
throw new InterruptedException();
|
||||
}
|
||||
@@ -192,7 +193,7 @@ public class GraphPart implements Serializable {
|
||||
for (Loop l : loops) {
|
||||
l.leadsToMark = 0;
|
||||
}
|
||||
return leadsTo(localData, gr, code, part, new ArrayList<>(), loops);
|
||||
return leadsTo(localData, gr, code, part, new HashSet<>(), loops);
|
||||
}
|
||||
|
||||
public GraphPart(int start, int end) {
|
||||
|
||||
Reference in New Issue
Block a user