Get rid of the operator[](uint) overloads
Those make no sense and where probably only there to workaround bugs in some old compilers. Change-Id: I5b196cc5306ac1c6307257b70179278d82d383c1 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>bb10
parent
4802f96d4d
commit
37e054993b
|
|
@ -1458,16 +1458,6 @@ QByteArray &QByteArray::operator=(const char *str)
|
|||
Same as at(\a i).
|
||||
*/
|
||||
|
||||
/*! \fn QByteRef QByteArray::operator[](uint i)
|
||||
|
||||
\overload
|
||||
*/
|
||||
|
||||
/*! \fn char QByteArray::operator[](uint i) const
|
||||
|
||||
\overload
|
||||
*/
|
||||
|
||||
/*!
|
||||
\fn char QByteArray::front() const
|
||||
\since 5.10
|
||||
|
|
|
|||
|
|
@ -208,9 +208,7 @@ public:
|
|||
|
||||
inline char at(int i) const;
|
||||
inline char operator[](int i) const;
|
||||
inline char operator[](uint i) const;
|
||||
Q_REQUIRED_RESULT inline QByteRef operator[](int i);
|
||||
Q_REQUIRED_RESULT inline QByteRef operator[](uint i);
|
||||
Q_REQUIRED_RESULT char front() const { return at(0); }
|
||||
Q_REQUIRED_RESULT inline QByteRef front();
|
||||
Q_REQUIRED_RESULT char back() const { return at(size() - 1); }
|
||||
|
|
@ -477,8 +475,6 @@ inline char QByteArray::at(int i) const
|
|||
{ Q_ASSERT(uint(i) < uint(size())); return d->data()[i]; }
|
||||
inline char QByteArray::operator[](int i) const
|
||||
{ Q_ASSERT(uint(i) < uint(size())); return d->data()[i]; }
|
||||
inline char QByteArray::operator[](uint i) const
|
||||
{ Q_ASSERT(i < uint(size())); return d->data()[i]; }
|
||||
|
||||
inline bool QByteArray::isEmpty() const
|
||||
{ return d->size == 0; }
|
||||
|
|
@ -599,8 +595,6 @@ public:
|
|||
|
||||
inline QByteRef QByteArray::operator[](int i)
|
||||
{ Q_ASSERT(i >= 0); detach(); return QByteRef(*this, i); }
|
||||
inline QByteRef QByteArray::operator[](uint i)
|
||||
{ detach(); return QByteRef(*this, i); }
|
||||
inline QByteRef QByteArray::front() { return operator[](0); }
|
||||
inline QByteRef QByteArray::back() { return operator[](size() - 1); }
|
||||
inline QByteArray::iterator QByteArray::begin()
|
||||
|
|
|
|||
|
|
@ -5742,19 +5742,6 @@ QString QString::trimmed_helper(QString &str)
|
|||
\overload operator[]()
|
||||
*/
|
||||
|
||||
/*! \fn QCharRef QString::operator[](uint position)
|
||||
|
||||
\overload operator[]()
|
||||
|
||||
Returns the character at the specified \a position in the string as a
|
||||
modifiable reference.
|
||||
*/
|
||||
|
||||
/*! \fn const QChar QString::operator[](uint position) const
|
||||
Equivalent to \c at(position).
|
||||
\overload operator[]()
|
||||
*/
|
||||
|
||||
/*!
|
||||
\fn QChar QString::front() const
|
||||
\since 5.10
|
||||
|
|
|
|||
|
|
@ -291,8 +291,6 @@ public:
|
|||
inline const QChar at(int i) const;
|
||||
const QChar operator[](int i) const;
|
||||
Q_REQUIRED_RESULT QCharRef operator[](int i);
|
||||
const QChar operator[](uint i) const;
|
||||
Q_REQUIRED_RESULT QCharRef operator[](uint i);
|
||||
|
||||
Q_REQUIRED_RESULT inline QChar front() const { return at(0); }
|
||||
Q_REQUIRED_RESULT inline QCharRef front();
|
||||
|
|
@ -1028,8 +1026,6 @@ inline const QChar QString::at(int i) const
|
|||
{ Q_ASSERT(uint(i) < uint(size())); return QChar(d->data()[i]); }
|
||||
inline const QChar QString::operator[](int i) const
|
||||
{ Q_ASSERT(uint(i) < uint(size())); return QChar(d->data()[i]); }
|
||||
inline const QChar QString::operator[](uint i) const
|
||||
{ Q_ASSERT(i < uint(size())); return QChar(d->data()[i]); }
|
||||
inline bool QString::isEmpty() const
|
||||
{ return d->size == 0; }
|
||||
inline const QChar *QString::unicode() const
|
||||
|
|
@ -1285,8 +1281,6 @@ inline QString &QString::setUtf16(const ushort *autf16, int asize)
|
|||
{ return setUnicode(reinterpret_cast<const QChar *>(autf16), asize); }
|
||||
inline QCharRef QString::operator[](int i)
|
||||
{ Q_ASSERT(i >= 0); detach(); return QCharRef(*this, i); }
|
||||
inline QCharRef QString::operator[](uint i)
|
||||
{ detach(); return QCharRef(*this, i); }
|
||||
inline QCharRef QString::front() { return operator[](0); }
|
||||
inline QCharRef QString::back() { return operator[](size() - 1); }
|
||||
inline QString::iterator QString::begin()
|
||||
|
|
|
|||
Loading…
Reference in New Issue