diff options
| author | Marc Mutz <marc.mutz@qt.io> | 2025-02-07 11:50:32 +0100 |
|---|---|---|
| committer | Marc Mutz <marc.mutz@qt.io> | 2025-02-07 14:38:37 +0100 |
| commit | 7206f6a39d298ed9c94bccf7bdc57498fa73ac36 (patch) | |
| tree | beeaf43ca6de87dfd1b87c57b2411495fcedc0e7 /src | |
| parent | 3acd5a19511b9c1eb0890994cbf9d9bee4df1454 (diff) | |
QStringBuilder: remove an unneeded cast
memcpy() takes void*, not char*, so the cast from QChar* to char* is
not necessary (and potentially harmful).
Amends the start of the public history.
Pick-to: 6.9 6.8 6.5
Change-Id: I7b7178290bd30d93ed9e64b6b84294d0f7576c80
Reviewed-by: Ivan Solovev <ivan.solovev@qt.io>
Diffstat (limited to 'src')
| -rw-r--r-- | src/corelib/text/qstringbuilder.h | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/corelib/text/qstringbuilder.h b/src/corelib/text/qstringbuilder.h index 853033b2d91..0b296d5142a 100644 --- a/src/corelib/text/qstringbuilder.h +++ b/src/corelib/text/qstringbuilder.h @@ -253,7 +253,7 @@ template <> struct QConcatenable<QString> : private QAbstractConcatenable { const qsizetype n = a.size(); if (n) - memcpy(out, reinterpret_cast<const char*>(a.constData()), sizeof(QChar) * n); + memcpy(out, a.data(), sizeof(QChar) * n); out += n; } }; |
