diff --git a/src/list.hpp b/src/list.hpp index 8dce75f2b..59782b46a 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; }