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 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; } -- 2.54.0