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>
This commit is contained in:
parent
3acd5a1951
commit
7206f6a39d
@ -253,7 +253,7 @@ template <> struct QConcatenable<QString> : private QAbstractConcatenable
|
|||||||
{
|
{
|
||||||
const qsizetype n = a.size();
|
const qsizetype n = a.size();
|
||||||
if (n)
|
if (n)
|
||||||
memcpy(out, reinterpret_cast<const char*>(a.constData()), sizeof(QChar) * n);
|
memcpy(out, a.data(), sizeof(QChar) * n);
|
||||||
out += n;
|
out += n;
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
Loading…
x
Reference in New Issue
Block a user