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/Pl_QPDFTokenizer.cc | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) (limited to 'libqpdf/Pl_QPDFTokenizer.cc') 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(new BufferInputSource( - "tokenizer data", this->m->buf.getBuffer(), true)); + auto input = PointerHolder( + // 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); } -- cgit v1.2.3-54-g00ecf