From 2a1b44f57bd9ab460f275caab85896dd49903f7f Mon Sep 17 00:00:00 2001 From: Giuseppe D'Angelo Date: Fri, 16 Oct 2020 14:55:07 +0200 Subject: 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 --- src/corelib/text/qbytearraylist.cpp | 6 ------ src/corelib/text/qbytearraylist.h | 1 - 2 files changed, 7 deletions(-) (limited to 'src/corelib') diff --git a/src/corelib/text/qbytearraylist.cpp b/src/corelib/text/qbytearraylist.cpp index 621ee6be7c..c815e766ab 100644 --- a/src/corelib/text/qbytearraylist.cpp +++ b/src/corelib/text/qbytearraylist.cpp @@ -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 diff --git a/src/corelib/text/qbytearraylist.h b/src/corelib/text/qbytearraylist.h index 1ce8d21445..25f4395a5d 100644 --- a/src/corelib/text/qbytearraylist.h +++ b/src/corelib/text/qbytearraylist.h @@ -57,7 +57,6 @@ typedef QMutableListIterator 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 -- cgit v1.2.3