| Index: src/list-inl.h
|
| diff --git a/src/list-inl.h b/src/list-inl.h
|
| index a185af3197f937035ff760da30eea266e2f89bd2..28856d25cab2d16b737c982b0a74479d4172b046 100644
|
| --- a/src/list-inl.h
|
| +++ b/src/list-inl.h
|
| @@ -90,6 +90,16 @@ void List<T, P>::Iterate(void (*callback)(T* x)) {
|
|
|
|
|
| template<typename T, class P>
|
| +bool List<T, P>::Contains(T& elm) {
|
| + for (int i = 0; i < length_; i++) {
|
| + if (data_[i] == elm)
|
| + return true;
|
| + }
|
| + return false;
|
| +}
|
| +
|
| +
|
| +template<typename T, class P>
|
| void List<T, P>::Sort(int (*cmp)(const T* x, const T* y)) {
|
| qsort(data_,
|
| length_,
|
|
|