diff options
author | 2015-07-27 18:45:47 -0700 | |
---|---|---|
committer | 2015-07-27 18:45:47 -0700 | |
commit | 6e3231a9d705ee043cf827b22c807b0b96ea8893 (patch) | |
tree | 04cf44073d24084bf2e583ef808fe83caa6f0cf3 /src/fish_tests.cpp | |
parent | 85dad6913e77d81730f3aea478695429f441ebd5 (diff) |
Stop passing mutable references to completions around
Replace uses of vector<completion_t>& with vector<completion_t>*
This makes it clear at the call site that the object may be mutated.
Diffstat (limited to 'src/fish_tests.cpp')
-rw-r--r-- | src/fish_tests.cpp | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/fish_tests.cpp b/src/fish_tests.cpp index c56593fe..b245dc60 100644 --- a/src/fish_tests.cpp +++ b/src/fish_tests.cpp @@ -739,7 +739,7 @@ static void test_parser() say(L"Testing eval_args"); completion_list_t comps; - parser_t::principal_parser().expand_argument_list(L"alpha 'beta gamma' delta", comps); + parser_t::principal_parser().expand_argument_list(L"alpha 'beta gamma' delta", &comps); do_test(comps.size() == 3); do_test(comps.at(0).completion == L"alpha"); do_test(comps.at(1).completion == L"beta gamma"); @@ -1344,7 +1344,7 @@ static bool expand_test(const wchar_t *in, expand_flags_t flags, ...) wchar_t *arg; parse_error_list_t errors; - if (expand_string(in, output, flags, &errors) == EXPAND_ERROR) + if (expand_string(in, &output, flags, &errors) == EXPAND_ERROR) { if (errors.empty()) { @@ -1583,7 +1583,7 @@ static void test_pager_navigation() completion_list_t completions; for (size_t i=0; i < 19; i++) { - append_completion(completions, L"abcdefghij"); + append_completion(&completions, L"abcdefghij"); } pager_t pager; |