Remove some unused code from QTestCoreList

A count(T *list) was declared but not defined; and the plain count()
that was defined isn't called by anything.  It's in a private header,
so can be removed without harm.

Task-number: QTPM-1385
Change-Id: I1ac580d57996895a4123b4f55fa984e9c8001ecb
Reviewed-by: Jędrzej Nowacki <jedrzej.nowacki@qt.io>
This commit is contained in:
Edward Welbourne 2018-10-12 17:47:43 +02:00
parent 35bba2cac5
commit f00b72f133

View File

@ -66,9 +66,6 @@ class QTestCoreList
void addToList(T **list);
T *nextElement();
T *previousElement();
int count(T *list);
int count();
private:
T *next;
T *prev;
@ -121,20 +118,6 @@ T *QTestCoreList<T>::previousElement()
return prev;
}
template <class T>
int QTestCoreList<T>::count()
{
int numOfElements = 0;
T *it = next;
while (it) {
++numOfElements;
it = it->nextElement();
}
return numOfElements;
}
QT_END_NAMESPACE
#endif