diff options
| author | ScorrMorr <none> | 2019-09-19 11:35:40 +0200 |
|---|---|---|
| committer | Andrew Kelley <andrew@ziglang.org> | 2019-09-19 11:41:18 -0400 |
| commit | 7ebb7ca58091d136bf12dff4e19c49f8a120f102 (patch) | |
| tree | 534a663c7cc544ca81fa42a5df2e0712331b8126 /src/list.hpp | |
| parent | 1eb33966b100c34f9a432d76d45dd86176996936 (diff) | |
| download | zig-7ebb7ca58091d136bf12dff4e19c49f8a120f102.tar.gz zig-7ebb7ca58091d136bf12dff4e19c49f8a120f102.zip | |
pass param as ref in ZigList::append
Diffstat (limited to 'src/list.hpp')
| -rw-r--r-- | src/list.hpp | 2 |
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; } |
