QString: rename parameter clashing with member function of the same name

The size parameter shadows the size() member function, so rename it to
newSize.

Prepares for a follow-up change that ports from count()/length() to
size().

Change-Id: I0ca8af57d6351f85a568409a8d02b66371bb05e7
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
This commit is contained in:
Marc Mutz 2022-10-09 11:05:42 +02:00
parent a94731c2ad
commit e1d21fe813

View File

@ -2716,10 +2716,10 @@ void QString::resize(qsizetype size)
\snippet qstring/main.cpp 46
*/
void QString::resize(qsizetype size, QChar fillChar)
void QString::resize(qsizetype newSize, QChar fillChar)
{
const qsizetype oldSize = length();
resize(size);
resize(newSize);
const qsizetype difference = length() - oldSize;
if (difference > 0)
std::fill_n(d.data() + oldSize, difference, fillChar.unicode());