commit 7ebb7ca58091d136bf12dff4e19c49f8a120f102 (tree) parent 1eb33966b100c34f9a432d76d45dd86176996936 Author: ScorrMorr <none> Date: Thu, 19 Sep 2019 11:35:40 +0200 pass param as ref in ZigList::append Diffstat:
| M | src/list.hpp | | | 2 | +- |
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git 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; }