Commit 94a7bab5ae191faadad9321087ad29765f7bceca

Authored by m-holger
1 parent a7aec81f

Fix spelling of subtract in QIntC

cSpell.json
... ... @@ -643,7 +643,6 @@
643 643 "submatches",
644 644 "subparsers",
645 645 "subramanyam",
646   - "substract",
647 646 "swversion",
648 647 "sysnow",
649 648 "sysroot",
... ...
include/qpdf/QIntC.hh
... ... @@ -278,10 +278,9 @@ namespace QIntC // QIntC = qpdf Integer Conversion
278 278 QIntC::range_check_error<T>(cur, delta);
279 279 }
280 280  
281   - // ABI: fix spelling error in function name. Also remove "substract" from spelling dictionary.
282 281 template <typename T>
283 282 void
284   - range_check_substract_error(T const& cur, T const& delta)
  283 + range_check_subtract_error(T const& cur, T const& delta)
285 284 {
286 285 if ((delta > 0) && ((std::numeric_limits<T>::min() + delta) > cur)) {
287 286 std::ostringstream msg;
... ... @@ -297,15 +296,14 @@ namespace QIntC // QIntC = qpdf Integer Conversion
297 296 }
298 297 }
299 298  
300   - // ABI: fix typo in function name
301 299 template <typename T>
302 300 inline void
303   - range_check_substract(T const& cur, T const& delta)
  301 + range_check_subtract(T const& cur, T const& delta)
304 302 {
305 303 if ((delta >= 0) == (cur >= 0)) {
306 304 return;
307 305 }
308   - QIntC::range_check_substract_error<T>(cur, delta);
  306 + QIntC::range_check_subtract_error<T>(cur, delta);
309 307 }
310 308 }; // namespace QIntC
311 309  
... ...
libqpdf/QPDFNumberTreeObjectHelper.cc
... ... @@ -218,7 +218,7 @@ QPDFNumberTreeObjectHelper::findObjectAtOrBelow(
218 218 return false;
219 219 }
220 220 oh = i->second;
221   - QIntC::range_check_substract(idx, i->first);
  221 + QIntC::range_check_subtract(idx, i->first);
222 222 offset = idx - i->first;
223 223 return true;
224 224 }
... ...
libtests/qintc.cc
... ... @@ -48,7 +48,7 @@ try_range_check_subtract_real(char const* description, bool exp_pass, T const&amp; a
48 48 {
49 49 bool passed = false;
50 50 try {
51   - QIntC::range_check_substract(a, b);
  51 + QIntC::range_check_subtract(a, b);
52 52 std::cout << description << ": okay";
53 53 passed = true;
54 54 } catch (std::range_error& e) {
... ...
manual/release-notes.rst
... ... @@ -6,12 +6,6 @@ Release Notes
6 6 For a detailed list of changes, please see the file
7 7 :file:`ChangeLog` in the source distribution.
8 8  
9   -
10   -Planned changes for future 12.x (subject to change):
11   -
12   - - ``QIntC.hh`` contains the type ``substract``, which will be fixed
13   - to ``subtract``. (Not enabled with ``FUTURE`` option.)
14   -
15 9 .. x.y.z: not yet released
16 10  
17 11 12.0.0: not yet released
... ... @@ -23,6 +17,9 @@ Planned changes for future 12.x (subject to change):
23 17 or ``Buffer buffer2{buffer1.copy()};`` to make it explicit that
24 18 copying is intended.
25 19  
  20 + - ``QIntC.hh`` contained the typ0 ``substract`` in function names,
  21 + which has been fixed to ``subtract``.
  22 +
26 23 - Library Enhancements
27 24  
28 25 - ``QPDFObjectHandle`` supports move construction/assignment.
... ...