summaryrefslogtreecommitdiff
path: root/libs
diff options
context:
space:
mode:
Diffstat (limited to 'libs')
-rw-r--r--libs/subcircuit/subcircuit.cc5
1 files changed, 4 insertions, 1 deletions
diff --git a/libs/subcircuit/subcircuit.cc b/libs/subcircuit/subcircuit.cc
index b4e74be6..da263879 100644
--- a/libs/subcircuit/subcircuit.cc
+++ b/libs/subcircuit/subcircuit.cc
@@ -1064,7 +1064,10 @@ class SubCircuit::SolverWorker
assert(haystack.adjMatrix.at(j).count(haystackNeighbour) > 0);
int haystackEdgeType = haystack.adjMatrix.at(j).at(haystackNeighbour);
- for (const auto &otherCandidate : portmapCandidates[needleNeighbour]) {
+ std::set<std::map<std::string, std::string>> &candidates =
+ i == needleNeighbour ? thisCandidates : portmapCandidates[needleNeighbour];
+
+ for (const auto &otherCandidate : candidates) {
if (diCache.compare(needleEdgeType, haystackEdgeType, testCandidate, otherCandidate))
goto found_match;
}