BAN: fix LinkedList back/front functions

This commit is contained in:
Bananymous 2023-03-06 01:46:52 +02:00
parent 10ef3c6a54
commit e3a71289c0
1 changed files with 4 additions and 4 deletions

View File

@ -234,28 +234,28 @@ namespace BAN
const T& LinkedList<T>::back() const
{
ASSERT(!empty());
return *const_iterator(m_last);
return *const_iterator(m_last, false);
}
template<typename T>
T& LinkedList<T>::back()
{
ASSERT(!empty());
return *iterator(m_last);
return *iterator(m_last, false);
}
template<typename T>
const T& LinkedList<T>::front() const
{
ASSERT(!empty());
return *const_iterator(m_data);
return *const_iterator(m_data, false);
}
template<typename T>
T& LinkedList<T>::front()
{
ASSERT(!empty());
return *iterator(m_data);
return *iterator(m_data, false);
}
template<typename T>