From 6e3231a9d705ee043cf827b22c807b0b96ea8893 Mon Sep 17 00:00:00 2001 From: ridiculousfish Date: Mon, 27 Jul 2015 18:45:47 -0700 Subject: Stop passing mutable references to completions around Replace uses of vector& with vector* This makes it clear at the call site that the object may be mutated. --- src/builtin.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'src/builtin.cpp') diff --git a/src/builtin.cpp b/src/builtin.cpp index b31fb6a1..51aa445a 100644 --- a/src/builtin.cpp +++ b/src/builtin.cpp @@ -4226,8 +4226,10 @@ wcstring_list_t builtin_get_names(void) return result; } -void builtin_get_names(std::vector &list) +void builtin_get_names(std::vector *list) { + assert(list != NULL); + list->reserve(list->size() + BUILTIN_COUNT); for (size_t i=0; i < BUILTIN_COUNT; i++) { append_completion(list, builtin_datas[i].name); -- cgit v1.2.3