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:
parent
25677ec4b2
commit
e30aa59a89
@ -712,9 +712,8 @@ struct QBidiAlgorithm {
|
|||||||
analysis[pos].bidiDirection = QChar::DirEN;
|
analysis[pos].bidiDirection = QChar::DirEN;
|
||||||
++it;
|
++it;
|
||||||
}
|
}
|
||||||
} else {
|
|
||||||
lastETPosition.clear();
|
|
||||||
}
|
}
|
||||||
|
lastETPosition.clear();
|
||||||
}
|
}
|
||||||
last = current;
|
last = current;
|
||||||
lastPos = pos;
|
lastPos = pos;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user