Skip to content

Commit

Permalink
Fixed First and Last return type
Browse files Browse the repository at this point in the history
  • Loading branch information
luisllamasbinaburo authored Jan 7, 2020
1 parent 3e0f209 commit 7737505
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions src/ListLib.h
Original file line number Diff line number Diff line change
Expand Up @@ -32,8 +32,8 @@ class List
bool Contains(T item);
size_t IndexOf(T item);

void First();
void Last();
T& First();
T& Last();

void Add(T item);
void AddRange(T* items, size_t numItems);
Expand Down Expand Up @@ -116,13 +116,13 @@ size_t List<T>::Count() const
}

template <typename T>
void List<T>::First()
T& List<T>::First()
{
return _items[0];
}

template <typename T>
void List<T>::Last()
T& List<T>::Last()
{
return _items[_count - 1];
}
Expand Down

0 comments on commit 7737505

Please sign in to comment.