diff options
author | Jay Berkenbilt <ejb@ql.org> | 2013-02-24 03:46:21 +0100 |
---|---|---|
committer | Jay Berkenbilt <ejb@ql.org> | 2013-03-04 22:45:16 +0100 |
commit | 30027481f7f9e9191f7c8deea51850b7a76b1b1f (patch) | |
tree | 815af293c2f6e38994e6096a4499be0dc9a476f9 /libqpdf/Pl_LZWDecoder.cc | |
parent | babb47948a408ebad12c452ba3fdd78782360167 (diff) | |
download | qpdf-30027481f7f9e9191f7c8deea51850b7a76b1b1f.tar.zst |
Remove all old-style casts from C++ code
Diffstat (limited to 'libqpdf/Pl_LZWDecoder.cc')
-rw-r--r-- | libqpdf/Pl_LZWDecoder.cc | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/libqpdf/Pl_LZWDecoder.cc b/libqpdf/Pl_LZWDecoder.cc index 646e45de..f7c6fb30 100644 --- a/libqpdf/Pl_LZWDecoder.cc +++ b/libqpdf/Pl_LZWDecoder.cc @@ -98,7 +98,7 @@ Pl_LZWDecoder::getFirstChar(int code) unsigned char result = '\0'; if (code < 256) { - result = (unsigned char) code; + result = static_cast<unsigned char>(code); } else { @@ -131,7 +131,7 @@ Pl_LZWDecoder::addToTable(unsigned char next) assert(idx < table.size()); Buffer& b = table[idx]; last_data = b.getBuffer(); - last_size = (unsigned int) b.getSize(); + last_size = b.getSize(); } Buffer entry(1 + last_size); @@ -170,7 +170,7 @@ Pl_LZWDecoder::handleCode(int code) // be what we read last plus the first character of what // we're reading now. unsigned char next = '\0'; - unsigned int table_size = (unsigned int) table.size(); + unsigned int table_size = table.size(); if (code < 256) { // just read < 256; last time's next was code @@ -214,7 +214,7 @@ Pl_LZWDecoder::handleCode(int code) if (code < 256) { - unsigned char ch = (unsigned char) code; + unsigned char ch = static_cast<unsigned char>(code); getNext()->write(&ch, 1); } else |