From a96900eea51b1079efb7ee5c87a91a27306f03c7 Mon Sep 17 00:00:00 2001 From: Marc Mutz Date: Tue, 5 May 2020 23:53:22 +0200 Subject: [PATCH] QString: remove weird uses of QChar::unicode() Both *rc and fillChar have type QChar. So don't use QChar::unicode() to assign them to each other, just use QChar::op=... Change-Id: I050035ca16d613f3c57eb5a582978d23c2f04f36 Reviewed-by: Lars Knoll --- src/corelib/text/qstring.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/corelib/text/qstring.cpp b/src/corelib/text/qstring.cpp index f87cf41bf14..2238b7bbba0 100644 --- a/src/corelib/text/qstring.cpp +++ b/src/corelib/text/qstring.cpp @@ -8255,7 +8255,7 @@ static QString replaceArgEscapes(QStringView s, const ArgEscapeData &d, int fiel if (field_width > 0) { // left padded for (uint i = 0; i < pad_chars; ++i) - (rc++)->unicode() = fillChar.unicode(); + *rc++ = fillChar; } if (locale_arg) { @@ -8269,7 +8269,7 @@ static QString replaceArgEscapes(QStringView s, const ArgEscapeData &d, int fiel if (field_width < 0) { // right padded for (uint i = 0; i < pad_chars; ++i) - (rc++)->unicode() = fillChar.unicode(); + *rc++ = fillChar; } if (++repl_cnt == d.occurrences) {