Commit bfc5fc51f2bd0162bcf30351b81d0253afd4e941

Authored by Jay Berkenbilt
1 parent 90ec6c26

Remove unused argument in private setWriterOptions method

include/qpdf/QPDFJob.hh
@@ -504,8 +504,8 @@ class QPDFJob @@ -504,8 +504,8 @@ class QPDFJob
504 504
505 // Output generation 505 // Output generation
506 void doSplitPages(QPDF& pdf); 506 void doSplitPages(QPDF& pdf);
507 - void setWriterOptions(QPDF& pdf, QPDFWriter& w);  
508 - void setEncryptionOptions(QPDF&, QPDFWriter&); 507 + void setWriterOptions(QPDFWriter&);
  508 + void setEncryptionOptions(QPDFWriter&);
509 void maybeFixWritePassword(int R, std::string& password); 509 void maybeFixWritePassword(int R, std::string& password);
510 void writeOutfile(QPDF& pdf); 510 void writeOutfile(QPDF& pdf);
511 void writeJSON(QPDF& pdf); 511 void writeJSON(QPDF& pdf);
libqpdf/QPDFJob.cc
@@ -2661,7 +2661,7 @@ QPDFJob::maybeFixWritePassword(int R, std::string& password) @@ -2661,7 +2661,7 @@ QPDFJob::maybeFixWritePassword(int R, std::string& password)
2661 } 2661 }
2662 2662
2663 void 2663 void
2664 -QPDFJob::setEncryptionOptions(QPDF& pdf, QPDFWriter& w) 2664 +QPDFJob::setEncryptionOptions(QPDFWriter& w)
2665 { 2665 {
2666 int R = 0; 2666 int R = 0;
2667 if (m->keylen == 40) { 2667 if (m->keylen == 40) {
@@ -2782,7 +2782,7 @@ parse_version(std::string const& full_version_string, std::string& version, int& @@ -2782,7 +2782,7 @@ parse_version(std::string const& full_version_string, std::string& version, int&
2782 } 2782 }
2783 2783
2784 void 2784 void
2785 -QPDFJob::setWriterOptions(QPDF& pdf, QPDFWriter& w) 2785 +QPDFJob::setWriterOptions(QPDFWriter& w)
2786 { 2786 {
2787 if (m->compression_level >= 0) { 2787 if (m->compression_level >= 0) {
2788 Pl_Flate::setCompressionLevel(m->compression_level); 2788 Pl_Flate::setCompressionLevel(m->compression_level);
@@ -2837,7 +2837,7 @@ QPDFJob::setWriterOptions(QPDF& pdf, QPDFWriter& w) @@ -2837,7 +2837,7 @@ QPDFJob::setWriterOptions(QPDF& pdf, QPDFWriter& w)
2837 w.copyEncryptionParameters(*encryption_pdf); 2837 w.copyEncryptionParameters(*encryption_pdf);
2838 } 2838 }
2839 if (m->encrypt) { 2839 if (m->encrypt) {
2840 - setEncryptionOptions(pdf, w); 2840 + setEncryptionOptions(w);
2841 } 2841 }
2842 if (m->linearize) { 2842 if (m->linearize) {
2843 w.setLinearization(true); 2843 w.setLinearization(true);
@@ -2956,7 +2956,7 @@ QPDFJob::doSplitPages(QPDF& pdf) @@ -2956,7 +2956,7 @@ QPDFJob::doSplitPages(QPDF& pdf)
2956 throw std::runtime_error("split pages would overwrite input file with " + outfile); 2956 throw std::runtime_error("split pages would overwrite input file with " + outfile);
2957 } 2957 }
2958 QPDFWriter w(outpdf, outfile.c_str()); 2958 QPDFWriter w(outpdf, outfile.c_str());
2959 - setWriterOptions(outpdf, w); 2959 + setWriterOptions(w);
2960 w.write(); 2960 w.write();
2961 doIfVerbose([&](Pipeline& v, std::string const& prefix) { 2961 doIfVerbose([&](Pipeline& v, std::string const& prefix) {
2962 v << prefix << ": wrote file " << outfile << "\n"; 2962 v << prefix << ": wrote file " << outfile << "\n";
@@ -2991,7 +2991,7 @@ QPDFJob::writeOutfile(QPDF&amp; pdf) @@ -2991,7 +2991,7 @@ QPDFJob::writeOutfile(QPDF&amp; pdf)
2991 m->log->saveToStandardOutput(true); 2991 m->log->saveToStandardOutput(true);
2992 w.setOutputPipeline(m->log->getSave().get()); 2992 w.setOutputPipeline(m->log->getSave().get());
2993 } 2993 }
2994 - setWriterOptions(pdf, w); 2994 + setWriterOptions(w);
2995 w.write(); 2995 w.write();
2996 } 2996 }
2997 if (m->outfilename) { 2997 if (m->outfilename) {