diff options
author | Marc Mutz <marc.mutz@kdab.com> | 2020-05-10 23:18:18 +0200 |
---|---|---|
committer | Marc Mutz <marc.mutz@kdab.com> | 2020-05-19 10:15:38 +0200 |
commit | 2259a433ca341129253ceb69bbe9eefc546282a3 (patch) | |
tree | 662ed56adc65ae8ef7fdf858d200483a19822fb7 /src/corelib/text/qstringliteral.h | |
parent | 60ec350bc79d562c0611bc31e8655729272c31d6 (diff) |
QString: throughly port internals to char16_t
This includes allocating QString data as char16_t instead of ushort.
This isn't the end of the port, but an important milestone: the
traditional foldChar() functions are now all unused.
Change-Id: I766bebc2d70b6972e2045d3474c7f5770f4676d9
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
Diffstat (limited to 'src/corelib/text/qstringliteral.h')
-rw-r--r-- | src/corelib/text/qstringliteral.h | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/corelib/text/qstringliteral.h b/src/corelib/text/qstringliteral.h index c3b274ca90..0968a9531a 100644 --- a/src/corelib/text/qstringliteral.h +++ b/src/corelib/text/qstringliteral.h @@ -68,15 +68,15 @@ Q_STATIC_ASSERT_X(sizeof(qunicodechar) == 2, Q_BASIC_ATOMIC_INITIALIZER(-1), QArrayData::StaticDataFlags, 0 \ }; \ QStringPrivate holder = { \ - static_cast<QTypedArrayData<ushort> *>(const_cast<QArrayData *>(&qstring_literal)), \ - reinterpret_cast<ushort *>(const_cast<qunicodechar *>(QT_UNICODE_LITERAL(str))), \ + static_cast<QTypedArrayData<char16_t> *>(const_cast<QArrayData *>(&qstring_literal)), \ + const_cast<qunicodechar *>(QT_UNICODE_LITERAL(str)), \ Size \ }; \ return QString(holder); \ }()) \ /**/ -using QStringPrivate = QArrayDataPointer<ushort>; +using QStringPrivate = QArrayDataPointer<char16_t>; QT_END_NAMESPACE |