diff options
author | Thiago Macieira <thiago.macieira@nokia.com> | 2011-03-18 15:35:58 (GMT) |
---|---|---|
committer | Thiago Macieira <thiago.macieira@nokia.com> | 2011-03-22 14:51:45 (GMT) |
commit | 168d7f8b7620756d07b96c04848ae497a213b523 (patch) | |
tree | de46b1b5c033f080b46083069c226e82cd9d79bd | |
parent | dcb2ea1344a08c397dbdd125c2787d33ebfd4fc7 (diff) | |
download | Qt-168d7f8b7620756d07b96c04848ae497a213b523.zip Qt-168d7f8b7620756d07b96c04848ae497a213b523.tar.gz Qt-168d7f8b7620756d07b96c04848ae497a213b523.tar.bz2 |
Correct the code: use ushorts, not QChar
-rw-r--r-- | tests/benchmarks/corelib/tools/qstring/main.cpp | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/tests/benchmarks/corelib/tools/qstring/main.cpp b/tests/benchmarks/corelib/tools/qstring/main.cpp index 5513724..b3ab175 100644 --- a/tests/benchmarks/corelib/tools/qstring/main.cpp +++ b/tests/benchmarks/corelib/tools/qstring/main.cpp @@ -1442,14 +1442,14 @@ void tst_QString::fromLatin1() const } } -void fromLatin1_regular(QChar *dst, const char *str, int size) +void fromLatin1_regular(ushort *dst, const char *str, int size) { // from qstring.cpp: while (size--) *dst++ = (uchar)*str++; } -void fromLatin1_sse2_qt47(QChar *dst, const char *str, int size) +void fromLatin1_sse2_qt47(ushort *dst, const char *str, int size) { if (size >= 16) { int chunkCount = size >> 4; // divided by 16 @@ -1474,7 +1474,7 @@ void fromLatin1_sse2_qt47(QChar *dst, const char *str, int size) *dst++ = (uchar)*str++; } -typedef void (* FromLatin1Function)(QChar *, const char *, int); +typedef void (* FromLatin1Function)(ushort *, const char *, int); Q_DECLARE_METATYPE(FromLatin1Function) void tst_QString::fromLatin1Alternatives_data() const @@ -1501,7 +1501,7 @@ static void fromLatin1Alternatives_internal(FromLatin1Function function, bool do QString dst; dst.resize(len); - (function)(dst.data(), src, len); + (function)(&dst.data()->unicode(), src, len); if (doVerify) { QCOMPARE(dst, QString::fromLatin1(src, len)); |