Drop nullary overload of private QString::realloc
Change-Id: I196ec038ab7b648287e310525681f2d218059b51 Reviewed-by: Marius Storm-Olsen <marius.storm-olsen@nokia.com> Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>bb10
parent
4c892e14c6
commit
7488b79652
|
|
@ -1330,11 +1330,6 @@ void QString::realloc(int alloc)
|
|||
}
|
||||
}
|
||||
|
||||
void QString::realloc()
|
||||
{
|
||||
realloc(d->size);
|
||||
}
|
||||
|
||||
void QString::expand(int i)
|
||||
{
|
||||
int sz = d->size;
|
||||
|
|
@ -2823,7 +2818,7 @@ QString& QString::replace(const QRegExp &rx, const QString &after)
|
|||
if (isEmpty() && rx2.indexIn(*this) == -1)
|
||||
return *this;
|
||||
|
||||
realloc();
|
||||
realloc(d->size);
|
||||
|
||||
int index = 0;
|
||||
int numCaptures = rx2.captureCount();
|
||||
|
|
@ -2986,7 +2981,7 @@ QString &QString::replace(const QRegularExpression &re, const QString &after)
|
|||
if (!iterator.hasNext()) // no matches at all
|
||||
return *this;
|
||||
|
||||
realloc();
|
||||
realloc(d->size);
|
||||
|
||||
int numCaptures = re.captureCount();
|
||||
|
||||
|
|
@ -5088,8 +5083,10 @@ int QString::localeAwareCompare_helper(const QChar *data1, int length1,
|
|||
|
||||
const ushort *QString::utf16() const
|
||||
{
|
||||
if (IS_RAW_DATA(d))
|
||||
const_cast<QString*>(this)->realloc(); // ensure '\\0'-termination for ::fromRawData strings
|
||||
if (IS_RAW_DATA(d)) {
|
||||
// ensure '\0'-termination for ::fromRawData strings
|
||||
const_cast<QString*>(this)->realloc(d->size);
|
||||
}
|
||||
return d->data();
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -651,7 +651,6 @@ private:
|
|||
|
||||
static int grow(int);
|
||||
static void free(Data *);
|
||||
void realloc();
|
||||
void realloc(int alloc);
|
||||
void expand(int i);
|
||||
void updateProperties() const;
|
||||
|
|
@ -748,7 +747,7 @@ inline QChar *QString::data()
|
|||
inline const QChar *QString::constData() const
|
||||
{ return reinterpret_cast<const QChar*>(d->data()); }
|
||||
inline void QString::detach()
|
||||
{ if (d->ref.isShared() || (d->offset != sizeof(QStringData))) realloc(); }
|
||||
{ if (d->ref.isShared() || (d->offset != sizeof(QStringData))) realloc(d->size); }
|
||||
inline bool QString::isDetached() const
|
||||
{ return !d->ref.isShared(); }
|
||||
inline QString &QString::operator=(const QLatin1String &s)
|
||||
|
|
@ -925,7 +924,7 @@ inline void QString::reserve(int asize)
|
|||
inline void QString::squeeze()
|
||||
{
|
||||
if (d->ref.isShared() || d->size < int(d->alloc))
|
||||
realloc();
|
||||
realloc(d->size);
|
||||
|
||||
if (d->capacityReserved) {
|
||||
// cannot set unconditionally, since d could be shared_null or
|
||||
|
|
|
|||
Loading…
Reference in New Issue