From 75fe4f60c3f59af30cb1d8f2b5902d866c05550a Mon Sep 17 00:00:00 2001 From: Jay Berkenbilt Date: Sat, 16 Apr 2022 13:21:57 -0400 Subject: Use anonymous namespaces for file-private classes --- libqpdf/Pl_DCT.cc | 28 +++++++++++++++++----------- 1 file changed, 17 insertions(+), 11 deletions(-) (limited to 'libqpdf/Pl_DCT.cc') diff --git a/libqpdf/Pl_DCT.cc b/libqpdf/Pl_DCT.cc index 474acdd9..653fa559 100644 --- a/libqpdf/Pl_DCT.cc +++ b/libqpdf/Pl_DCT.cc @@ -14,12 +14,15 @@ # error "qpdf does not support libjpeg built with BITS_IN_JSAMPLE != 8" #endif -struct qpdf_jpeg_error_mgr +namespace { - struct jpeg_error_mgr pub; - jmp_buf jmpbuf; - std::string msg; -}; + struct qpdf_jpeg_error_mgr + { + struct jpeg_error_mgr pub; + jmp_buf jmpbuf; + std::string msg; + }; +} // namespace static void error_handler(j_common_ptr cinfo) @@ -147,13 +150,16 @@ Pl_DCT::finish() } } -struct dct_pipeline_dest +namespace { - struct jpeg_destination_mgr pub; /* public fields */ - unsigned char* buffer; - size_t size; - Pipeline* next; -}; + struct dct_pipeline_dest + { + struct jpeg_destination_mgr pub; /* public fields */ + unsigned char* buffer; + size_t size; + Pipeline* next; + }; +} // namespace static void init_pipeline_destination(j_compress_ptr) -- cgit v1.2.3-70-g09d2