clang-tidy: const reference conversions

These are only read from.

Signed-off-by: Rosen Penev <rosenp@gmail.com>
This commit is contained in:
Rosen Penev 2021-08-17 13:44:59 -07:00 committed by Johannes Altmanninger
parent f9af33f223
commit 4ea5189c4f
2 changed files with 3 additions and 3 deletions

View File

@ -201,7 +201,7 @@ struct options_t { //!OCLINT(too many fields)
escape_string_style_t escape_style = STRING_STYLE_SCRIPT; 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; ssize_t width = 0;
// TODO: this is the same as fish_wcwidth_min_0 from screen.cpp // TODO: this is the same as fish_wcwidth_min_0 from screen.cpp
// Make that reusable (and add a wcswidth version). // Make that reusable (and add a wcswidth version).

View File

@ -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( static proc_performer_t get_performer_for_builtin(
process_t *p, job_t *job, const io_chain_t &io_chain, process_t *p, job_t *job, const io_chain_t &io_chain,
const std::shared_ptr<output_stream_t> output_stream, const std::shared_ptr<output_stream_t> &output_stream,
const std::shared_ptr<output_stream_t> errput_stream) { const std::shared_ptr<output_stream_t> &errput_stream) {
assert(p->type == process_type_t::builtin && "Process must be a builtin"); assert(p->type == process_type_t::builtin && "Process must be a builtin");
// Determine if we have a "direct" redirection for stdin. // Determine if we have a "direct" redirection for stdin.