Commit 6e3e2591 authored by Mathieu Giraud's avatar Mathieu Giraud

core/list_utils.h: make keep_n_first really work

parent 739a4e30
......@@ -16,7 +16,7 @@ list<T> keep_n_first(list<T> l, size_t count) {
size_t i = 0;
typename list<T>::iterator it = l.begin();
for (; it != l.end() && i < count ; it++)
count++;
i++;
return list<T>(l.begin(), it);
}
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment