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:
parent
35bba2cac5
commit
f00b72f133
@ -66,9 +66,6 @@ class QTestCoreList
|
|||||||
void addToList(T **list);
|
void addToList(T **list);
|
||||||
T *nextElement();
|
T *nextElement();
|
||||||
T *previousElement();
|
T *previousElement();
|
||||||
int count(T *list);
|
|
||||||
int count();
|
|
||||||
|
|
||||||
private:
|
private:
|
||||||
T *next;
|
T *next;
|
||||||
T *prev;
|
T *prev;
|
||||||
@ -121,20 +118,6 @@ T *QTestCoreList<T>::previousElement()
|
|||||||
return prev;
|
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
|
QT_END_NAMESPACE
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
Loading…
Reference in New Issue
Block a user