Remove QByteArrayList_indexOf

It was used as exported symbol for the implementation of
QByteArrayList::indexOf. Since then, the implementation has
been changed, and this code is unused.

Change-Id: I468d05507b6b520cf5bfa4bc567a3d67c43b9a32
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
bb10
Giuseppe D'Angelo 2020-10-16 14:55:07 +02:00
parent d1785f73db
commit 2a1b44f57b
2 changed files with 0 additions and 7 deletions

View File

@ -150,10 +150,4 @@ QByteArray QtPrivate::QByteArrayList_join(const QByteArrayList *that, const char
return res;
}
int QtPrivate::QByteArrayList_indexOf(const QByteArrayList *that, const char *needle, int from)
{
const auto it = std::find_if(that->begin() + from, that->end(), [needle](const QByteArray &item) { return item == needle; });
return it == that->end() ? -1 : int(std::distance(that->begin(), it));
}
QT_END_NAMESPACE

View File

@ -57,7 +57,6 @@ typedef QMutableListIterator<QByteArray> QMutableByteArrayListIterator;
namespace QtPrivate {
QByteArray Q_CORE_EXPORT QByteArrayList_join(const QByteArrayList *that, const char *separator, int separatorLength);
int Q_CORE_EXPORT QByteArrayList_indexOf(const QByteArrayList *that, const char *needle, int from);
}
#endif