diff options
author | Jay Berkenbilt <ejb@ql.org> | 2022-04-03 22:10:27 +0200 |
---|---|---|
committer | Jay Berkenbilt <ejb@ql.org> | 2022-04-05 20:56:19 +0200 |
commit | 77e889495f7c513ba8677df5fe662f08053709eb (patch) | |
tree | 06191e152c3d7a4e398837ebc4f87038b1797bc9 /libqpdf/Pl_QPDFTokenizer.cc | |
parent | 12f1eb15ca3fed6310402847559a7c99d3c77847 (diff) | |
download | qpdf-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/Pl_QPDFTokenizer.cc')
-rw-r--r-- | libqpdf/Pl_QPDFTokenizer.cc | 12 |
1 files changed, 8 insertions, 4 deletions
diff --git a/libqpdf/Pl_QPDFTokenizer.cc b/libqpdf/Pl_QPDFTokenizer.cc index 632c2f1d..1f2b35b4 100644 --- a/libqpdf/Pl_QPDFTokenizer.cc +++ b/libqpdf/Pl_QPDFTokenizer.cc @@ -44,8 +44,10 @@ void Pl_QPDFTokenizer::finish() { this->m->buf.finish(); - auto input = PointerHolder<InputSource>(new BufferInputSource( - "tokenizer data", this->m->buf.getBuffer(), true)); + auto input = PointerHolder<InputSource>( + // line-break + new BufferInputSource( + "tokenizer data", this->m->buf.getBuffer(), true)); while (true) { QPDFTokenizer::Token token = this->m->tokenizer.readToken( @@ -59,8 +61,10 @@ Pl_QPDFTokenizer::finish() // Read the space after the ID. char ch = ' '; input->read(&ch, 1); - this->m->filter->handleToken(QPDFTokenizer::Token( - QPDFTokenizer::tt_space, std::string(1, ch))); + this->m->filter->handleToken( + // line-break + QPDFTokenizer::Token( + QPDFTokenizer::tt_space, std::string(1, ch))); QTC::TC("qpdf", "Pl_QPDFTokenizer found ID"); this->m->tokenizer.expectInlineImage(input); } |