-
…y` with subscript operator, and simplify logic.
-
…`getKey` with subscript operator, and simplify logic.
-
…ictionary` APIs, replace `getKey` with subscript operator, streamline logic, and simplify bounds checks.
-
- Marked `NNTreeIterator` and `NNTreeImpl` as `final` to prevent inheritance. - Inlined `NNTreeIterator` and `NNTreeImpl` methods to streamline code and reduce redundancy. - Updated constructors, operators, and utility functions in `NNTreeIterator` and `NNTreeImpl` for improved readability and maintainability.
-
- Added `const` qualifiers to member functions and parameters where applicable. - Replaced `QPDFObjectHandle` arrays with `qpdf::Array` for improved type clarity. - Simplified logic in `compareKeyItem` and `compareKeyKid` by removing redundant checks.
-
- Simplified the code by directly handling limits validation in `compareKeyKid`. - Improved clarity by reducing unnecessary method indirection.
-
- Removed `NNTreeDetails` and moved key validation logic directly into `NNTreeImpl`. - Replaced type determination with `qpdf_object_type_e` for improved clarity. - Updated `QPDFNameTreeObjectHelper` and `QPDFNumberTreeObjectHelper` to align with the new `NNTreeImpl` structure. - Simplified methods accessing tree items and validating keys.
-
- Introduced a `validate()` method in `QPDFNameTreeObjectHelper`, `QPDFNumberTreeObjectHelper`, and `NNTreeImpl`. - Ensure proper validation of tree keys and values, detecting invalid entries, unsorted keys, and inconsistencies. - Added support for auto-repair in case of validation errors.
-
- Introduced `std::function<bool(QPDFObjectHandle const&)>` to validate tree values. - Updated constructors and methods across `QPDFNameTreeObjectHelper` and `QPDFNumberTreeObjectHelper` to support value validation. - Refactored `NNTreeImpl` to check for invalid values during insertion, iteration, and retrieval. - Improved error handling and reporting for invalid values.
-
…eplace `getArrayNItems` with `size`, and improve error handling logic.
-
…lify `withinLimits` logic, and improve code readability with subscript operators.
-
…edundant debug traces.
-
…and improve `findInternal` readability.
-
…dding error counting and leveraging `reconstructed_xref` for improved robustness, limiting the acceptable number of errors for damaged files.
-
Refactored several classes to use C++11 `final` specifiers for inheritance restrictions and added default member initializations. These changes enhance code clarity, improve safety, and ensure modern coding practices.
-
Remove the name/number tree object helper constructors that don't take a QPDF&.
-
Run this: for i in **/*.cc **/*.c **/*.h **/*.hh; do clang-format < $i >| $i.new && mv $i.new $i done
-
Create the typedefs directly in iterators rather than deriving from the deprecated std::iterator class.
-
Keep a std::pair internal to the iterators so that operator* can return a reference and operator-> can work, and each can work without copying pairs of objects around.
-
Add constructors that take a QPDF object so we can issue warnings and create new indirect objects.
-
Create a computationally and memory efficient implementation of name and number trees that does binary searches as intended by the data structure rather than loading into a map, which can use a great deal of memory and can be very slow.