From 30027481f7f9e9191f7c8deea51850b7a76b1b1f Mon Sep 17 00:00:00 2001 From: Jay Berkenbilt Date: Sat, 23 Feb 2013 21:46:21 -0500 Subject: Remove all old-style casts from C++ code --- libqpdf/Pl_LZWDecoder.cc | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'libqpdf/Pl_LZWDecoder.cc') 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(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(code); getNext()->write(&ch, 1); } else -- cgit v1.2.3-54-g00ecf