summaryrefslogtreecommitdiffstats
path: root/libqpdf/Pl_DCT.cc
diff options
context:
space:
mode:
authorm-holger <m-holger@kubitscheck.org>2023-05-20 14:34:53 +0200
committerm-holger <m-holger@kubitscheck.org>2023-05-20 16:41:44 +0200
commit2fa581537b068e5ddcaee68fd7b92e290fc5fc53 (patch)
treebcd19f51a33a389f9da1ca09b5b4b0c8e2d2cd5b /libqpdf/Pl_DCT.cc
parent41ec7eda54e2263eeb1aee4c3a0616c9c2777fb7 (diff)
downloadqpdf-2fa581537b068e5ddcaee68fd7b92e290fc5fc53.tar.zst
Use auto when initializing with a cast
Diffstat (limited to 'libqpdf/Pl_DCT.cc')
-rw-r--r--libqpdf/Pl_DCT.cc12
1 files changed, 6 insertions, 6 deletions
diff --git a/libqpdf/Pl_DCT.cc b/libqpdf/Pl_DCT.cc
index c01398ad..299b48b1 100644
--- a/libqpdf/Pl_DCT.cc
+++ b/libqpdf/Pl_DCT.cc
@@ -24,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);
@@ -167,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;
@@ -178,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);
}
@@ -192,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;
@@ -261,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 ( \
@@ -316,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 ( \