aboutsummaryrefslogtreecommitdiffstats
path: root/libqpdf/InputSource.cc
diff options
context:
space:
mode:
authorJay Berkenbilt <ejb@ql.org>2022-04-03 22:10:27 +0200
committerJay Berkenbilt <ejb@ql.org>2022-04-05 20:56:19 +0200
commit77e889495f7c513ba8677df5fe662f08053709eb (patch)
tree06191e152c3d7a4e398837ebc4f87038b1797bc9 /libqpdf/InputSource.cc
parent12f1eb15ca3fed6310402847559a7c99d3c77847 (diff)
downloadqpdf-77e889495f7c513ba8677df5fe662f08053709eb.tar.zst
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.
Diffstat (limited to 'libqpdf/InputSource.cc')
-rw-r--r--libqpdf/InputSource.cc9
1 files changed, 6 insertions, 3 deletions
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<char*>(memchr(
- p, start_chars[0], bytes_read - QIntC::to_size(p - buf)))) !=
- 0) {
+ if ((p = static_cast<char*>(
+ // 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]");
}