gbranden pushed a commit to branch branden-2023-07-05 in repository groff. commit fd1670ec4a4bfdd6802be9e1bffe93e00506ce8b Author: G. Branden Robinson <g.branden.robin...@gmail.com> AuthorDate: Thu May 18 17:30:09 2023 -0500
src/roff/troff/hvunits.h: Boolify. * src/roff/troff/hvunits.h: Boolify. (class vunits, class hunits, vunits::is_zero, hunits::is_zero): Do it. Also update editor aid comments; drop old style Emacs file-local variable setting. --- ChangeLog | 6 ++++++ src/roff/troff/hvunits.h | 14 +++++++++----- 2 files changed, 15 insertions(+), 5 deletions(-) diff --git a/ChangeLog b/ChangeLog index 7819b3053..bc5dc307d 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,9 @@ +2023-05-18 G. Branden Robinson <g.branden.robin...@gmail.com> + + * src/roff/troff/hvunits.h: Boolify. + (class vunits, class hunits, vunits::is_zero, hunits::is_zero): + Do it. + 2023-05-13 G. Branden Robinson <g.branden.robin...@gmail.com> * src/roff/troff/node.cpp: Rename request-handling functions to diff --git a/src/roff/troff/hvunits.h b/src/roff/troff/hvunits.h index e47a0a039..04517a7bf 100644 --- a/src/roff/troff/hvunits.h +++ b/src/roff/troff/hvunits.h @@ -1,4 +1,3 @@ -// -*- C++ -*- /* Copyright (C) 1989-2020 Free Software Foundation, Inc. Written by James Clark (j...@jclark.com) @@ -24,7 +23,7 @@ public: vunits(); vunits(units); units to_units(); - int is_zero(); + bool is_zero(); vunits& operator+=(const vunits&); vunits& operator-=(const vunits&); friend inline vunits scale(vunits n, units x, units y); // scale n by x/y @@ -53,7 +52,7 @@ public: hunits(); hunits(units); units to_units(); - int is_zero(); + bool is_zero(); hunits& operator+=(const hunits&); hunits& operator-=(const hunits&); friend inline hunits scale(hunits n, units x, units y); // scale n by x/y @@ -89,7 +88,7 @@ inline units vunits::to_units() return n*vresolution; } -inline int vunits::is_zero() +inline bool vunits::is_zero() { return n == 0; } @@ -198,7 +197,7 @@ inline units hunits::to_units() return n*hresolution; } -inline int hunits::is_zero() +inline bool hunits::is_zero() { return n == 0; } @@ -337,3 +336,8 @@ inline units points_to_units(units n) return scale(n, units_per_inch, 72); } +// Local Variables: +// fill-column: 72 +// mode: C++ +// End: +// vim: set cindent noexpandtab shiftwidth=2 textwidth=72: _______________________________________________ Groff-commit mailing list Groff-commit@gnu.org https://lists.gnu.org/mailman/listinfo/groff-commit