append_narrow_buffer takes const reference

This commit is contained in:
Aaron Gyes 2022-04-07 09:22:56 -07:00
parent c06d85d175
commit b514ec5fe6
2 changed files with 2 additions and 2 deletions

View File

@ -307,7 +307,7 @@ shared_ptr<const io_data_t> 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);
}

View File

@ -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, ...) {