violet: don't bother swapping holders if unable to trim graph

This commit is contained in:
Alex Coyte 2017-08-08 11:24:52 +10:00 committed by Matthew Barr
parent 34ed4a6991
commit 72973ccb47

View File

@ -1713,6 +1713,11 @@ void removeRedundantLiteralsFromInfix(const NGHolder &h, RoseInGraph &ig,
continue; continue;
} }
if (!delay) {
/* unable to trim graph --> no point swapping to new holder */
continue;
}
assert(isCorrectlyTopped(*h_new)); assert(isCorrectlyTopped(*h_new));
graphs[right] = make_pair(h_new, delay); graphs[right] = make_pair(h_new, delay);
} }