diff options
Diffstat (limited to 'backend/List.hpp')
-rw-r--r-- | backend/List.hpp | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/backend/List.hpp b/backend/List.hpp index 25e7a56..634f14b 100644 --- a/backend/List.hpp +++ b/backend/List.hpp @@ -8,7 +8,7 @@ size_t List<T>::size() const { } template <typename T> -void List<T>::push_back(T & el) { +void List<T>::push_back(const T & el) { ListLink<T> * link = new ListLink<T> { .prev = this->head, .next = nullptr, @@ -78,17 +78,17 @@ T & List<T>::operator [] (size_t index) const { } template <typename T> -ListRange<T> List<T>::range() const { +ListRange<T> List<T>::range() { return { *this }; } template <typename T> -ListIterator<T> List<T>::begin() const { +ListIterator<T> List<T>::begin() { return this->range().begin(); } template <typename T> -ListIterator<T> List<T>::end() const { +ListIterator<T> List<T>::end() { return this->range().end(); } |