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:
parent
a94731c2ad
commit
e1d21fe813
@ -2716,10 +2716,10 @@ void QString::resize(qsizetype size)
|
|||||||
\snippet qstring/main.cpp 46
|
\snippet qstring/main.cpp 46
|
||||||
*/
|
*/
|
||||||
|
|
||||||
void QString::resize(qsizetype size, QChar fillChar)
|
void QString::resize(qsizetype newSize, QChar fillChar)
|
||||||
{
|
{
|
||||||
const qsizetype oldSize = length();
|
const qsizetype oldSize = length();
|
||||||
resize(size);
|
resize(newSize);
|
||||||
const qsizetype difference = length() - oldSize;
|
const qsizetype difference = length() - oldSize;
|
||||||
if (difference > 0)
|
if (difference > 0)
|
||||||
std::fill_n(d.data() + oldSize, difference, fillChar.unicode());
|
std::fill_n(d.data() + oldSize, difference, fillChar.unicode());
|
||||||
|
Loading…
x
Reference in New Issue
Block a user