summaryrefslogtreecommitdiffstats
path: root/libqpdf/Pl_LZWDecoder.cc
diff options
context:
space:
mode:
authorJay Berkenbilt <jberkenbilt@users.noreply.github.com>2023-06-17 15:26:16 +0200
committerGitHub <noreply@github.com>2023-06-17 15:26:16 +0200
commit44dce4e2988ec09e36dfb6d1fc527a143e6f597f (patch)
tree3cdb1999faeb5103eb87c36fb1673d8cbb5ab082 /libqpdf/Pl_LZWDecoder.cc
parentfc30e75122f6bef20ac8d676ac7cb8822feecf3e (diff)
parentacd0acf16931ce92bc908e4960c5a1e43d53b550 (diff)
downloadqpdf-44dce4e2988ec09e36dfb6d1fc527a143e6f597f.tar.zst
Merge pull request #978 from m-holger/reflow
Code tidy - reflow comments and strings
Diffstat (limited to 'libqpdf/Pl_LZWDecoder.cc')
-rw-r--r--libqpdf/Pl_LZWDecoder.cc11
1 files changed, 4 insertions, 7 deletions
diff --git a/libqpdf/Pl_LZWDecoder.cc b/libqpdf/Pl_LZWDecoder.cc
index 8e5fd9d1..4ffcaa3f 100644
--- a/libqpdf/Pl_LZWDecoder.cc
+++ b/libqpdf/Pl_LZWDecoder.cc
@@ -149,9 +149,8 @@ Pl_LZWDecoder::handleCode(unsigned int code)
this->eod = true;
} else {
if (this->last_code != 256) {
- // Add to the table from last time. New table entry would
- // be what we read last plus the first character of what
- // we're reading now.
+ // Add to the table from last time. New table entry would be what we read last plus the
+ // first character of what we're reading now.
unsigned char next = '\0';
unsigned int table_size = QIntC::to_uint(table.size());
if (code < 256) {
@@ -162,10 +161,8 @@ Pl_LZWDecoder::handleCode(unsigned int code)
if (idx > table_size) {
throw std::runtime_error("LZWDecoder: bad code received");
} else if (idx == table_size) {
- // The encoder would have just created this entry,
- // so the first character of this entry would have
- // been the same as the first character of the
- // last entry.
+ // The encoder would have just created this entry, so the first character of
+ // this entry would have been the same as the first character of the last entry.
QTC::TC("libtests", "Pl_LZWDecoder last was table size");
next = getFirstChar(this->last_code);
} else {