mirror of https://github.com/qt/qtbase.git
util/unicode: readEastAsianWidth(): remove simplified() call
All users of the split()ed value handle intervening whitespace
already:
- fields[0] is piped through parseHexRange(), which does
- fields[1] has trimmed() called on it before lookup and all
idnaStatusMap values are space-free (cf. initIdnaStatusMap())
As a consequence, we can accept the line by reference to const
QByteArray now.
Amends 838a7a01f3
.
Pick-to: 6.10 6.9 6.8 6.5
Change-Id: I53247332c624a192fcaca6009a3f20cb8c65786a
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
This commit is contained in:
parent
079b97b7ac
commit
2c3c479c20
|
@ -1629,9 +1629,7 @@ static void readDerivedAge()
|
||||||
static void readEastAsianWidth()
|
static void readEastAsianWidth()
|
||||||
{
|
{
|
||||||
readUnicodeFile("EastAsianWidth.txt",
|
readUnicodeFile("EastAsianWidth.txt",
|
||||||
[] (QByteArray &line, int lineNo) {
|
[] (const QByteArray &line, int lineNo) {
|
||||||
line = std::move(line).simplified();
|
|
||||||
|
|
||||||
QList<QByteArray> fields = line.split(';');
|
QList<QByteArray> fields = line.split(';');
|
||||||
Q_ASSERT(fields.size() == 2);
|
Q_ASSERT(fields.size() == 2);
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue