From 658b5bb3be49d2666b91d35671de71c1cf0a5853 Mon Sep 17 00:00:00 2001 From: Jay Berkenbilt Date: Sat, 22 Jun 2019 09:59:47 -0400 Subject: QPDFWriter: clean up overloaded functions In a small number of cases, it makes sense to replace an overloaded function with a function that takes a default argument. We can do this now because we've already broken binary compatibility since the last release. --- include/qpdf/QPDFWriter.hh | 11 +++-------- 1 file changed, 3 insertions(+), 8 deletions(-) (limited to 'include') diff --git a/include/qpdf/QPDFWriter.hh b/include/qpdf/QPDFWriter.hh index 703d752f..860b0630 100644 --- a/include/qpdf/QPDFWriter.hh +++ b/include/qpdf/QPDFWriter.hh @@ -248,9 +248,7 @@ class QPDFWriter // R3 encryption parameters are used, and to 1.5 when object // streams are used. QPDF_DLL - void setMinimumPDFVersion(std::string const&); - QPDF_DLL - void setMinimumPDFVersion(std::string const&, int extension_level); + void setMinimumPDFVersion(std::string const&, int extension_level = 0); // Force the PDF version of the output file to be a given version. // Use of this function may create PDF files that will not work @@ -268,9 +266,7 @@ class QPDFWriter // Additionally, forcing to a version below 1.5 will disable // object streams. QPDF_DLL - void forcePDFVersion(std::string const&); - QPDF_DLL - void forcePDFVersion(std::string const&, int extension_level); + void forcePDFVersion(std::string const&, int extension_level = 0); // Provide additional text to insert in the PDF file somewhere // near the beginning of the file. This can be used to add @@ -483,10 +479,9 @@ class QPDFWriter void writeTrailer(trailer_e which, int size, bool xref_stream, qpdf_offset_t prev, int linearization_pass); - void unparseObject(QPDFObjectHandle object, int level, int flags); void unparseObject(QPDFObjectHandle object, int level, int flags, // for stream dictionaries - size_t stream_length, bool compress); + size_t stream_length = 0, bool compress = false); void unparseChild(QPDFObjectHandle child, int level, int flags); void initializeSpecialStreams(); void preserveObjectStreams(); -- cgit v1.2.3-54-g00ecf