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. --- libqpdf/QPDFWriter.cc | 24 ++++++------------------ 1 file changed, 6 insertions(+), 18 deletions(-) (limited to 'libqpdf/QPDFWriter.cc') diff --git a/libqpdf/QPDFWriter.cc b/libqpdf/QPDFWriter.cc index 93a634f2..7702dc34 100644 --- a/libqpdf/QPDFWriter.cc +++ b/libqpdf/QPDFWriter.cc @@ -231,12 +231,6 @@ QPDFWriter::setNewlineBeforeEndstream(bool val) this->m->newline_before_endstream = val; } -void -QPDFWriter::setMinimumPDFVersion(std::string const& version) -{ - setMinimumPDFVersion(version, 0); -} - void QPDFWriter::setMinimumPDFVersion(std::string const& version, int extension_level) @@ -285,12 +279,6 @@ QPDFWriter::setMinimumPDFVersion(std::string const& version, } } -void -QPDFWriter::forcePDFVersion(std::string const& version) -{ - forcePDFVersion(version, 0); -} - void QPDFWriter::forcePDFVersion(std::string const& version, int extension_level) @@ -1433,12 +1421,6 @@ QPDFWriter::writeTrailer(trailer_e which, int size, bool xref_stream, writeString(">>"); } -void -QPDFWriter::unparseObject(QPDFObjectHandle object, int level, int flags) -{ - unparseObject(object, level, flags, 0, false); -} - void QPDFWriter::unparseObject(QPDFObjectHandle object, int level, int flags, size_t stream_length, @@ -2811,6 +2793,9 @@ QPDFWriter::writeHintStream(int hint_id) qpdf_offset_t QPDFWriter::writeXRefTable(trailer_e which, int first, int last, int size) { + // There are too many extra arguments to replace overloaded + // function with defaults in the header file...too much risk of + // leaving something off. return writeXRefTable(which, first, last, size, 0, false, 0, 0, 0, 0); } @@ -2858,6 +2843,9 @@ qpdf_offset_t QPDFWriter::writeXRefStream(int objid, int max_id, qpdf_offset_t max_offset, trailer_e which, int first, int last, int size) { + // There are too many extra arguments to replace overloaded + // function with defaults in the header file...too much risk of + // leaving something off. return writeXRefStream(objid, max_id, max_offset, which, first, last, size, 0, 0, 0, 0, false, 0); } -- cgit v1.2.3-54-g00ecf