mirror of
https://github.com/fish-shell/fish-shell.git
synced 2025-02-01 21:51:44 +08:00
append_narrow_buffer takes const reference
This commit is contained in:
parent
c06d85d175
commit
b514ec5fe6
|
@ -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);
|
||||
}
|
||||
|
|
2
src/io.h
2
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, ...) {
|
||||
|
|
Loading…
Reference in New Issue
Block a user