From 01ef951c6570afcebc73c363be039a4d62e07679 Mon Sep 17 00:00:00 2001 From: Marc Mutz Date: Thu, 19 Jan 2023 15:53:16 +0100 Subject: QString: port toUcs4_helper() to char16_t/char32_t This gets rid of 50% of the casts required to call the function, and removes the last QtCore QStringView(ushort*) user. As a drive-by, replace an (allowed, but) fishy &str[0] with str.data(), the mutable overload of which has been available since C++17. Task-number: QTBUG-110403 Change-Id: Iad494025b61c53d991e59cc73198bb014a422a93 Reviewed-by: Ahmad Samir Reviewed-by: Thiago Macieira --- src/corelib/text/qstring.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/corelib/text/qstring.cpp') diff --git a/src/corelib/text/qstring.cpp b/src/corelib/text/qstring.cpp index e2eb27a4d4..d0836c3b92 100644 --- a/src/corelib/text/qstring.cpp +++ b/src/corelib/text/qstring.cpp @@ -2419,7 +2419,7 @@ void qtWarnAboutInvalidRegularExpression(const QString &pattern, const char *whe toStdU32String() */ -qsizetype QString::toUcs4_helper(const ushort *uc, qsizetype length, uint *out) +qsizetype QString::toUcs4_helper(const char16_t *uc, qsizetype length, char32_t *out) { qsizetype count = 0; -- cgit v1.2.3