append_with_separation: Default to wanting a newline

The recent change to skip the newline for `string` changed this, and
it also hit builtin path (which is in development separately, so it's
not like it broke master).

Let's pick a good default here.
This commit is contained in:
Fabian Homborg 2022-03-13 18:44:25 +01:00
parent 83a993a28e
commit e429f76e9f

View file

@ -368,10 +368,10 @@ class output_stream_t : noncopyable_t, nonmovable_t {
/// \param want_newline this is true if the output item should be ended with a newline. This
/// is only relevant if we are printing the output to a stream,
virtual void append_with_separation(const wchar_t *s, size_t len, separation_type_t type,
bool want_newline);
bool want_newline = true);
/// The following are all convenience overrides.
void append_with_separation(const wcstring &s, separation_type_t type, bool want_newline) {
void append_with_separation(const wcstring &s, separation_type_t type, bool want_newline = true) {
append_with_separation(s.data(), s.size(), type, want_newline);
}