From 94a7bab5ae191faadad9321087ad29765f7bceca Mon Sep 17 00:00:00 2001 From: m-holger Date: Tue, 11 Feb 2025 14:06:12 +0000 Subject: [PATCH] Fix spelling of subtract in QIntC --- cSpell.json | 1 - include/qpdf/QIntC.hh | 8 +++----- libqpdf/QPDFNumberTreeObjectHelper.cc | 2 +- libtests/qintc.cc | 2 +- manual/release-notes.rst | 9 +++------ 5 files changed, 8 insertions(+), 14 deletions(-) diff --git a/cSpell.json b/cSpell.json index 4f9b3e0..2122d85 100644 --- a/cSpell.json +++ b/cSpell.json @@ -643,7 +643,6 @@ "submatches", "subparsers", "subramanyam", - "substract", "swversion", "sysnow", "sysroot", diff --git a/include/qpdf/QIntC.hh b/include/qpdf/QIntC.hh index 3558d81..f0cf411 100644 --- a/include/qpdf/QIntC.hh +++ b/include/qpdf/QIntC.hh @@ -278,10 +278,9 @@ namespace QIntC // QIntC = qpdf Integer Conversion QIntC::range_check_error(cur, delta); } - // ABI: fix spelling error in function name. Also remove "substract" from spelling dictionary. template void - range_check_substract_error(T const& cur, T const& delta) + range_check_subtract_error(T const& cur, T const& delta) { if ((delta > 0) && ((std::numeric_limits::min() + delta) > cur)) { std::ostringstream msg; @@ -297,15 +296,14 @@ namespace QIntC // QIntC = qpdf Integer Conversion } } - // ABI: fix typo in function name template inline void - range_check_substract(T const& cur, T const& delta) + range_check_subtract(T const& cur, T const& delta) { if ((delta >= 0) == (cur >= 0)) { return; } - QIntC::range_check_substract_error(cur, delta); + QIntC::range_check_subtract_error(cur, delta); } }; // namespace QIntC diff --git a/libqpdf/QPDFNumberTreeObjectHelper.cc b/libqpdf/QPDFNumberTreeObjectHelper.cc index 478a188..adf3ddd 100644 --- a/libqpdf/QPDFNumberTreeObjectHelper.cc +++ b/libqpdf/QPDFNumberTreeObjectHelper.cc @@ -218,7 +218,7 @@ QPDFNumberTreeObjectHelper::findObjectAtOrBelow( return false; } oh = i->second; - QIntC::range_check_substract(idx, i->first); + QIntC::range_check_subtract(idx, i->first); offset = idx - i->first; return true; } diff --git a/libtests/qintc.cc b/libtests/qintc.cc index d360dd4..d7711c2 100644 --- a/libtests/qintc.cc +++ b/libtests/qintc.cc @@ -48,7 +48,7 @@ try_range_check_subtract_real(char const* description, bool exp_pass, T const& a { bool passed = false; try { - QIntC::range_check_substract(a, b); + QIntC::range_check_subtract(a, b); std::cout << description << ": okay"; passed = true; } catch (std::range_error& e) { diff --git a/manual/release-notes.rst b/manual/release-notes.rst index c5522ba..fd55ac6 100644 --- a/manual/release-notes.rst +++ b/manual/release-notes.rst @@ -6,12 +6,6 @@ Release Notes For a detailed list of changes, please see the file :file:`ChangeLog` in the source distribution. - -Planned changes for future 12.x (subject to change): - - - ``QIntC.hh`` contains the type ``substract``, which will be fixed - to ``subtract``. (Not enabled with ``FUTURE`` option.) - .. x.y.z: not yet released 12.0.0: not yet released @@ -23,6 +17,9 @@ Planned changes for future 12.x (subject to change): or ``Buffer buffer2{buffer1.copy()};`` to make it explicit that copying is intended. + - ``QIntC.hh`` contained the typ0 ``substract`` in function names, + which has been fixed to ``subtract``. + - Library Enhancements - ``QPDFObjectHandle`` supports move construction/assignment. -- libgit2 0.21.4