diff options
author | Jay Berkenbilt <jberkenbilt@users.noreply.github.com> | 2023-05-20 17:29:09 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-05-20 17:29:09 +0200 |
commit | fd17c8e3fe38a56abf50ce0edec1cde48d4f74cb (patch) | |
tree | c1efea1b140cac94dbaf496ae6ec5e0a621daa07 /libqpdf/Pl_DCT.cc | |
parent | a6d7b79e65941238871c0c3d7d06b9bf246213ba (diff) | |
parent | e6577a1323cd813a92ddbc8841e1342c05de071a (diff) | |
download | qpdf-fd17c8e3fe38a56abf50ce0edec1cde48d4f74cb.tar.zst |
Merge pull request #963 from m-holger/tidy
Code tidy
Diffstat (limited to 'libqpdf/Pl_DCT.cc')
-rw-r--r-- | libqpdf/Pl_DCT.cc | 17 |
1 files changed, 7 insertions, 10 deletions
diff --git a/libqpdf/Pl_DCT.cc b/libqpdf/Pl_DCT.cc index f7cc4b75..299b48b1 100644 --- a/libqpdf/Pl_DCT.cc +++ b/libqpdf/Pl_DCT.cc @@ -2,12 +2,9 @@ #include <qpdf/QIntC.hh> #include <qpdf/QTC.hh> -#include <qpdf/QUtil.hh> -#include <cstring> -#include <setjmp.h> +#include <csetjmp> #include <stdexcept> -#include <stdlib.h> #include <string> #if BITS_IN_JSAMPLE != 8 @@ -27,7 +24,7 @@ namespace static void error_handler(j_common_ptr cinfo) { - qpdf_jpeg_error_mgr* jerr = + auto* jerr = reinterpret_cast<qpdf_jpeg_error_mgr*>(cinfo->err); char buf[JMSG_LENGTH_MAX]; (*cinfo->err->format_message)(cinfo, buf); @@ -170,7 +167,7 @@ static boolean empty_pipeline_output_buffer(j_compress_ptr cinfo) { QTC::TC("libtests", "Pl_DCT empty_pipeline_output_buffer"); - dct_pipeline_dest* dest = reinterpret_cast<dct_pipeline_dest*>(cinfo->dest); + auto* dest = reinterpret_cast<dct_pipeline_dest*>(cinfo->dest); dest->next->write(dest->buffer, dest->size); dest->pub.next_output_byte = dest->buffer; dest->pub.free_in_buffer = dest->size; @@ -181,7 +178,7 @@ static void term_pipeline_destination(j_compress_ptr cinfo) { QTC::TC("libtests", "Pl_DCT term_pipeline_destination"); - dct_pipeline_dest* dest = reinterpret_cast<dct_pipeline_dest*>(cinfo->dest); + auto* dest = reinterpret_cast<dct_pipeline_dest*>(cinfo->dest); dest->next->write(dest->buffer, dest->size - dest->pub.free_in_buffer); } @@ -195,7 +192,7 @@ jpeg_pipeline_dest( reinterpret_cast<j_common_ptr>(cinfo), JPOOL_PERMANENT, sizeof(dct_pipeline_dest))); - dct_pipeline_dest* dest = reinterpret_cast<dct_pipeline_dest*>(cinfo->dest); + auto* dest = reinterpret_cast<dct_pipeline_dest*>(cinfo->dest); dest->pub.init_destination = init_pipeline_destination; dest->pub.empty_output_buffer = empty_pipeline_output_buffer; dest->pub.term_destination = term_pipeline_destination; @@ -264,7 +261,7 @@ jpeg_buffer_src(j_decompress_ptr cinfo, Buffer* buffer) void Pl_DCT::compress(void* cinfo_p, Buffer* b) { - struct jpeg_compress_struct* cinfo = + auto* cinfo = reinterpret_cast<jpeg_compress_struct*>(cinfo_p); #if ( \ @@ -319,7 +316,7 @@ Pl_DCT::compress(void* cinfo_p, Buffer* b) void Pl_DCT::decompress(void* cinfo_p, Buffer* b) { - struct jpeg_decompress_struct* cinfo = + auto* cinfo = reinterpret_cast<jpeg_decompress_struct*>(cinfo_p); #if ( \ |