From 06ffb912ca824ad98ae3685363c2e8087fc347b9 Mon Sep 17 00:00:00 2001 From: Giuseppe D'Angelo Date: Thu, 13 Aug 2020 17:47:44 +0200 Subject: [PATCH] Drop qunicodechar It's unused except in the definition of QStringLiteral, where we can just use char16_t. The static_assert can also go as it's already checked in qglobal.cpp. Change-Id: I06e8a87b4dea1582cd84957efca1b8ad0d2e0266 Reviewed-by: Thiago Macieira --- src/corelib/text/qstringliteral.h | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/src/corelib/text/qstringliteral.h b/src/corelib/text/qstringliteral.h index 4d24937eb74..d86e6eafd9f 100644 --- a/src/corelib/text/qstringliteral.h +++ b/src/corelib/text/qstringliteral.h @@ -55,15 +55,10 @@ QT_BEGIN_NAMESPACE // to lacking stdlib support. But QStringLiteral only needs the // core language feature, so just use u"" here unconditionally: -typedef char16_t qunicodechar; - -static_assert(sizeof(qunicodechar) == 2, - "qunicodechar must typedef an integral type of size 2"); - #define QT_UNICODE_LITERAL(str) u"" str #define QStringLiteral(str) \ (QString(QStringPrivate(nullptr, \ - reinterpret_cast(const_cast(QT_UNICODE_LITERAL(str))), \ + const_cast(QT_UNICODE_LITERAL(str)), \ sizeof(QT_UNICODE_LITERAL(str))/2 - 1))) \ /**/