From 4ea5189c4fb88cb975b5e62c2c697f3ceb72caf5 Mon Sep 17 00:00:00 2001 From: Rosen Penev Date: Tue, 17 Aug 2021 13:44:59 -0700 Subject: [PATCH] clang-tidy: const reference conversions These are only read from. Signed-off-by: Rosen Penev --- src/builtin_string.cpp | 2 +- src/exec.cpp | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/builtin_string.cpp b/src/builtin_string.cpp index 1689825c3..2870e8af4 100644 --- a/src/builtin_string.cpp +++ b/src/builtin_string.cpp @@ -201,7 +201,7 @@ struct options_t { //!OCLINT(too many fields) escape_string_style_t escape_style = STRING_STYLE_SCRIPT; }; -static size_t width_without_escapes(wcstring ins) { +static size_t width_without_escapes(const wcstring &ins) { ssize_t width = 0; // TODO: this is the same as fish_wcwidth_min_0 from screen.cpp // Make that reusable (and add a wcswidth version). diff --git a/src/exec.cpp b/src/exec.cpp index e89be39cb..c30b8f61c 100644 --- a/src/exec.cpp +++ b/src/exec.cpp @@ -722,8 +722,8 @@ static launch_result_t exec_block_or_func_process(parser_t &parser, const std::s static proc_performer_t get_performer_for_builtin( process_t *p, job_t *job, const io_chain_t &io_chain, - const std::shared_ptr output_stream, - const std::shared_ptr errput_stream) { + const std::shared_ptr &output_stream, + const std::shared_ptr &errput_stream) { assert(p->type == process_type_t::builtin && "Process must be a builtin"); // Determine if we have a "direct" redirection for stdin.