aboutsummaryrefslogtreecommitdiff
path: root/src/list.hpp
diff options
context:
space:
mode:
authorScorrMorr <none>2019-09-19 11:35:40 +0200
committerAndrew Kelley <andrew@ziglang.org>2019-09-19 11:41:18 -0400
commit7ebb7ca58091d136bf12dff4e19c49f8a120f102 (patch)
tree534a663c7cc544ca81fa42a5df2e0712331b8126 /src/list.hpp
parent1eb33966b100c34f9a432d76d45dd86176996936 (diff)
downloadzig-7ebb7ca58091d136bf12dff4e19c49f8a120f102.tar.gz
zig-7ebb7ca58091d136bf12dff4e19c49f8a120f102.zip
pass param as ref in ZigList::append
Diffstat (limited to 'src/list.hpp')
-rw-r--r--src/list.hpp2
1 files changed, 1 insertions, 1 deletions
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;
}