groff-commit
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[groff] 99/115: src/roff/troff/hvunits.h: Boolify.


From: G. Branden Robinson
Subject: [groff] 99/115: src/roff/troff/hvunits.h: Boolify.
Date: Thu, 1 Jun 2023 10:46:17 -0400 (EDT)

gbranden pushed a commit to branch branden-2022-06-01
in repository groff.

commit 057a6bfb0ba50de11ea4ee2169901bfbbde03834
Author: G. Branden Robinson <g.branden.robinson@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 709190d5f..9a8f37364 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,9 @@
+2023-05-18  G. Branden Robinson <g.branden.robinson@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.robinson@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 (jjc@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:



reply via email to

[Prev in Thread] Current Thread [Next in Thread]