aboutsummaryrefslogtreecommitdiffstats
path: root/libqpdf/Pl_LZWDecoder.cc
diff options
context:
space:
mode:
authorm-holger <m-holger@kubitscheck.org>2023-05-27 19:19:52 +0200
committerm-holger <m-holger@kubitscheck.org>2023-06-02 17:00:40 +0200
commit3c5700c255f4603b5df9c6d183d13dd71a083cc3 (patch)
tree0f01c62c54b56d009b341922fa3441907a2e560b /libqpdf/Pl_LZWDecoder.cc
parent6e6a73d28f5f61f038209a61a3e85995dc71aa32 (diff)
downloadqpdf-3c5700c255f4603b5df9c6d183d13dd71a083cc3.tar.zst
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 {