diff --git a/src/list.hpp b/src/list.hpp index 8dce75f2b84f254382be8a0f26f3f00f9ed22eb2..59782b46a878ea3b89d0bb76e60f13abb99de5bc 100644 --- a/src/list.hpp +++ b/src/list.hpp @@ -15,7 +15,7 @@ struct ZigList { void deinit() { free(items); } - void append(T item) { + void append(const T& item) { ensure_capacity(length + 1); items[length++] = item; }