Commit 94a7bab5ae191faadad9321087ad29765f7bceca
1 parent
a7aec81f
Fix spelling of subtract in QIntC
Showing
5 changed files
with
8 additions
and
14 deletions
cSpell.json
include/qpdf/QIntC.hh
| @@ -278,10 +278,9 @@ namespace QIntC // QIntC = qpdf Integer Conversion | @@ -278,10 +278,9 @@ namespace QIntC // QIntC = qpdf Integer Conversion | ||
| 278 | QIntC::range_check_error<T>(cur, delta); | 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 | template <typename T> | 281 | template <typename T> |
| 283 | void | 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 | if ((delta > 0) && ((std::numeric_limits<T>::min() + delta) > cur)) { | 285 | if ((delta > 0) && ((std::numeric_limits<T>::min() + delta) > cur)) { |
| 287 | std::ostringstream msg; | 286 | std::ostringstream msg; |
| @@ -297,15 +296,14 @@ namespace QIntC // QIntC = qpdf Integer Conversion | @@ -297,15 +296,14 @@ namespace QIntC // QIntC = qpdf Integer Conversion | ||
| 297 | } | 296 | } |
| 298 | } | 297 | } |
| 299 | 298 | ||
| 300 | - // ABI: fix typo in function name | ||
| 301 | template <typename T> | 299 | template <typename T> |
| 302 | inline void | 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 | if ((delta >= 0) == (cur >= 0)) { | 303 | if ((delta >= 0) == (cur >= 0)) { |
| 306 | return; | 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 | }; // namespace QIntC | 308 | }; // namespace QIntC |
| 311 | 309 |
libqpdf/QPDFNumberTreeObjectHelper.cc
| @@ -218,7 +218,7 @@ QPDFNumberTreeObjectHelper::findObjectAtOrBelow( | @@ -218,7 +218,7 @@ QPDFNumberTreeObjectHelper::findObjectAtOrBelow( | ||
| 218 | return false; | 218 | return false; |
| 219 | } | 219 | } |
| 220 | oh = i->second; | 220 | oh = i->second; |
| 221 | - QIntC::range_check_substract(idx, i->first); | 221 | + QIntC::range_check_subtract(idx, i->first); |
| 222 | offset = idx - i->first; | 222 | offset = idx - i->first; |
| 223 | return true; | 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& a | @@ -48,7 +48,7 @@ try_range_check_subtract_real(char const* description, bool exp_pass, T const& a | ||
| 48 | { | 48 | { |
| 49 | bool passed = false; | 49 | bool passed = false; |
| 50 | try { | 50 | try { |
| 51 | - QIntC::range_check_substract(a, b); | 51 | + QIntC::range_check_subtract(a, b); |
| 52 | std::cout << description << ": okay"; | 52 | std::cout << description << ": okay"; |
| 53 | passed = true; | 53 | passed = true; |
| 54 | } catch (std::range_error& e) { | 54 | } catch (std::range_error& e) { |
manual/release-notes.rst
| @@ -6,12 +6,6 @@ Release Notes | @@ -6,12 +6,6 @@ Release Notes | ||
| 6 | For a detailed list of changes, please see the file | 6 | For a detailed list of changes, please see the file |
| 7 | :file:`ChangeLog` in the source distribution. | 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 | .. x.y.z: not yet released | 9 | .. x.y.z: not yet released |
| 16 | 10 | ||
| 17 | 12.0.0: not yet released | 11 | 12.0.0: not yet released |
| @@ -23,6 +17,9 @@ Planned changes for future 12.x (subject to change): | @@ -23,6 +17,9 @@ Planned changes for future 12.x (subject to change): | ||
| 23 | or ``Buffer buffer2{buffer1.copy()};`` to make it explicit that | 17 | or ``Buffer buffer2{buffer1.copy()};`` to make it explicit that |
| 24 | copying is intended. | 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 | - Library Enhancements | 23 | - Library Enhancements |
| 27 | 24 | ||
| 28 | - ``QPDFObjectHandle`` supports move construction/assignment. | 25 | - ``QPDFObjectHandle`` supports move construction/assignment. |