remove unnecessary checks

This commit is contained in:
Yarik Briukhovetskyi 2024-05-07 19:35:09 +02:00 committed by GitHub
parent ed59a5c248
commit cdcdb4cf71
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
3 changed files with 4 additions and 4 deletions

View File

@ -453,7 +453,7 @@ void PrettyBlockOutputFormat::writeValueWithPadding(
value_width = format_settings.pretty.max_value_width; value_width = format_settings.pretty.max_value_width;
has_break_line = false; has_break_line = false;
} }
else if (!has_break_line || !format_settings.pretty.preserve_border_for_multiline_string) else if (!has_break_line)
value += ' '; value += ' ';
auto write_padding = [&]() auto write_padding = [&]()
@ -478,7 +478,7 @@ void PrettyBlockOutputFormat::writeValueWithPadding(
write_padding(); write_padding();
} }
if (has_break_line && format_settings.pretty.preserve_border_for_multiline_string) if (has_break_line)
writeString("", out); writeString("", out);
} }

View File

@ -194,7 +194,7 @@ void PrettyCompactBlockOutputFormat::writeRow(
writeReadableNumberTip(chunk); writeReadableNumberTip(chunk);
writeCString("\n", out); writeCString("\n", out);
if (has_transferred_row && format_settings.pretty.preserve_border_for_multiline_string) if (has_transferred_row)
writeTransferredRow(max_widths, header, transferred_row, cut_to_width, false); writeTransferredRow(max_widths, header, transferred_row, cut_to_width, false);
} }

View File

@ -111,7 +111,7 @@ void PrettySpaceBlockOutputFormat::writeChunk(const Chunk & chunk, PortKind port
writeReadableNumberTip(chunk); writeReadableNumberTip(chunk);
writeChar('\n', out); writeChar('\n', out);
if (has_transferred_row && format_settings.pretty.preserve_border_for_multiline_string) if (has_transferred_row)
writeTransferredRow(max_widths, header, transferred_row, cut_to_width, true); writeTransferredRow(max_widths, header, transferred_row, cut_to_width, true);
} }