瀏覽代碼

rspamc: optimize indentation condition

tags/3.5
Amish 1 年之前
父節點
當前提交
07b1b57c88
共有 1 個檔案被更改,包括 1 行新增2 行删除
  1. 1
    2
      src/client/rspamc.cxx

+ 1
- 2
src/client/rspamc.cxx 查看文件

@@ -840,8 +840,7 @@ rspamc_print_indented_line(FILE *out, std::string_view line) -> void
for (size_t pos = 0; pos < line.size(); ) {
auto len = pos ? (maxlen-indent) : maxlen;
auto s = line.substr(pos, len);
if (s.size() == len && // is string long enough?
(pos + s.size()) < line.size() && // reached EOL?
if ((pos + s.size()) < line.size() && // reached EOL?
break_begin.find_first_of( line.at(pos + s.size())) == std::string_view::npos // new word next?
) {
auto wrap_at = s.find_last_of(break_end);

Loading…
取消
儲存