From b514ec5fe61046643218ee18ebe3a6c842ef45df Mon Sep 17 00:00:00 2001 From: Aaron Gyes Date: Thu, 7 Apr 2022 09:22:56 -0700 Subject: [PATCH] append_narrow_buffer takes const reference --- src/io.cpp | 2 +- src/io.h | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/io.cpp b/src/io.cpp index 9e86ebebc..c2a1de33f 100644 --- a/src/io.cpp +++ b/src/io.cpp @@ -307,7 +307,7 @@ shared_ptr io_chain_t::io_for_fd(int fd) const { return nullptr; } -void output_stream_t::append_narrow_buffer(separated_buffer_t buffer) { +void output_stream_t::append_narrow_buffer(const separated_buffer_t &buffer) { for (const auto &rhs_elem : buffer.elements()) { append_with_separation(str2wcstring(rhs_elem.contents), rhs_elem.separation, false); } diff --git a/src/io.h b/src/io.h index 55247f9a8..b1aa81558 100644 --- a/src/io.h +++ b/src/io.h @@ -384,7 +384,7 @@ class output_stream_t : noncopyable_t, nonmovable_t { void push_back(wchar_t c) { append(c); } // Append data from a narrow buffer, widening it. - void append_narrow_buffer(separated_buffer_t buffer); + void append_narrow_buffer(const separated_buffer_t &buffer); /// Append a format string. void append_format(const wchar_t *format, ...) {