From a8c046a2a32e742a1b71c6c392e39c85b99b5129 Mon Sep 17 00:00:00 2001 From: Marc Mutz Date: Tue, 4 Apr 2017 14:41:11 +0200 Subject: [PATCH] Use (new) QStringIterator(QStringView) to avoid casts This is the only one in QtBase that casts to be able to use QStringIterator. Amends d40dcee642c69784f771aae86531ae65b458f1a5. Change-Id: I709e0285717e8d17feab9ab0020c8d0aed0dbe36 Reviewed-by: Giuseppe D'Angelo --- src/corelib/tools/qstring.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/corelib/tools/qstring.cpp b/src/corelib/tools/qstring.cpp index 53784dd570..6c97e2563c 100644 --- a/src/corelib/tools/qstring.cpp +++ b/src/corelib/tools/qstring.cpp @@ -1596,7 +1596,7 @@ int QString::toUcs4_helper(const ushort *uc, int length, uint *out) { int count = 0; - QStringIterator i(reinterpret_cast(uc), reinterpret_cast(uc + length)); + QStringIterator i(QStringView(uc, length)); while (i.hasNext()) out[count++] = i.next();