Fix a quadratic behavior in the BiDi algorithm

Reset the lastETPosition after we changed DirET to DirEN,
to avoid iterating over the same set of characters many times.

Change-Id: Ib4113d0ba87ad70fc6bb386632eb094f943c080d
Reviewed-by: Robert Loehning <robert.loehning@qt.io>
This commit is contained in:
Lars Knoll 2020-02-14 13:13:24 +01:00
parent 25677ec4b2
commit e30aa59a89

View File

@ -712,9 +712,8 @@ struct QBidiAlgorithm {
analysis[pos].bidiDirection = QChar::DirEN;
++it;
}
} else {
lastETPosition.clear();
}
lastETPosition.clear();
}
last = current;
lastPos = pos;