aboutsummaryrefslogtreecommitdiff
path: root/backend/List.hpp
diff options
context:
space:
mode:
Diffstat (limited to 'backend/List.hpp')
-rw-r--r--backend/List.hpp10
1 files changed, 5 insertions, 5 deletions
diff --git a/backend/List.hpp b/backend/List.hpp
index 17b6ce7..c2c5ce2 100644
--- a/backend/List.hpp
+++ b/backend/List.hpp
@@ -3,7 +3,7 @@
#include "List.h"
template <typename T>
-size_t List<T>::size() {
+size_t List<T>::size() const {
return this->length;
}
@@ -63,7 +63,7 @@ void List<T>::clear() {
}
template <typename T>
-T & List<T>::operator [] (size_t index) {
+T & List<T>::operator [] (size_t index) const {
ListLink<T> * link = this->tail;
for (size_t i = 0; i < index; i++)
link = link->next;
@@ -71,17 +71,17 @@ T & List<T>::operator [] (size_t index) {
}
template <typename T>
-ListRange<T> List<T>::range() {
+ListRange<T> List<T>::range() const {
return { *this };
}
template <typename T>
-ListIterator<T> List<T>::begin() {
+ListIterator<T> List<T>::begin() const {
return this->range().begin();
}
template <typename T>
-ListIterator<T> List<T>::end() {
+ListIterator<T> List<T>::end() const {
return this->range().end();
}