From 77e889495f7c513ba8677df5fe662f08053709eb Mon Sep 17 00:00:00 2001 From: Jay Berkenbilt Date: Sun, 3 Apr 2022 16:10:27 -0400 Subject: Update some code manually to get better formatting results Add comments to force line breaks, parenthesize function arguments that are contatenated strings, etc. -- these kinds of changes improve clang-format's results and also cause emacs cc-mode to match clang-format. After this type of change, most of the time, when clang-format and emacs disagree, clang-format is better. --- libqpdf/InputSource.cc | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) (limited to 'libqpdf/InputSource.cc') diff --git a/libqpdf/InputSource.cc b/libqpdf/InputSource.cc index 56e941eb..0afca9e3 100644 --- a/libqpdf/InputSource.cc +++ b/libqpdf/InputSource.cc @@ -121,9 +121,12 @@ InputSource::findFirst( } // Search for the first character. - if ((p = static_cast(memchr( - p, start_chars[0], bytes_read - QIntC::to_size(p - buf)))) != - 0) { + if ((p = static_cast( + // line-break + memchr( + p, + start_chars[0], + bytes_read - QIntC::to_size(p - buf)))) != 0) { if (p == buf) { QTC::TC("libtests", "InputSource found match at buf[0]"); } -- cgit v1.2.3-54-g00ecf