Commit 7d10a8abb4a0c9e2299930b1b7246a59fd54372a

Authored by m-holger
1 parent 6434e09d

Deprecate QPDF::optimize

include/qpdf/QPDF.hh
... ... @@ -674,8 +674,7 @@ class QPDF
674 674 // /Length, /Filter, and /DecodeParms; 1 if it should discard /Length, and 0 if it should
675 675 // preserve all keys. This is used by QPDFWriter to avoid creation of dangling objects for
676 676 // stream dictionary keys it will be regenerating.
677   - QPDF_DLL
678   - void optimize(
  677 + [[deprecated("Unused - see release notes for qpdf 12.1.0")]] QPDF_DLL void optimize(
679 678 std::map<int, int> const& object_stream_data,
680 679 bool allow_changes = true,
681 680 std::function<int(QPDFObjectHandle&)> skip_stream_parameters = nullptr);
... ...
libqpdf/QPDF_linearization.cc
... ... @@ -483,7 +483,7 @@ QPDF::checkLinearizationInternal()
483 483 object_stream_data[og.getObj()] = entry.getObjStreamNumber();
484 484 }
485 485 }
486   - optimize(object_stream_data, false);
  486 + optimize_internal(object_stream_data, false, nullptr);
487 487 calculateLinearizationData(object_stream_data);
488 488 }
489 489  
... ...
manual/release-notes.rst
... ... @@ -41,6 +41,9 @@ more detail.
41 41  
42 42 - Other changes
43 43  
  44 + - The ``QPDF::optimize`` method is believed to be not in use and has been
  45 + deprecated. If you are relying on it please open a ticket_.
  46 +
44 47 - The parsing of object streams including the creation of error/warning
45 48 messages and object descriptions has been refactored with some
46 49 improvement both in runtime and memory usage.
... ...