From 7ebb7ca58091d136bf12dff4e19c49f8a120f102 Mon Sep 17 00:00:00 2001 From: ScorrMorr Date: Thu, 19 Sep 2019 11:35:40 +0200 Subject: [PATCH] pass param as ref in ZigList::append --- src/list.hpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/list.hpp b/src/list.hpp index 8dce75f2b8..59782b46a8 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; }