gbranden pushed a commit to branch master
in repository groff.

commit 4092717abc212ecd1f1dc7226aa51d1c871b7b54
Author: G. Branden Robinson <g.branden.robin...@gmail.com>
AuthorDate: Sat Apr 27 06:43:46 2024 -0500

    [troff]: Boolify env.cpp (24/25).
    
    [troff]: Boolify more `environment` class member variables, member
    function parameters, and local variables.
    
    * src/roff/troff/env.h (class environment):
    * src/roff/troff/env.cpp (environment::add_tab): Rename parameter
      `repeated` to `is_repeated` and demote it from `int` to `bool`.
---
 ChangeLog              | 5 +++++
 src/roff/troff/env.cpp | 5 +++--
 src/roff/troff/env.h   | 2 +-
 3 files changed, 9 insertions(+), 3 deletions(-)

diff --git a/ChangeLog b/ChangeLog
index e71f2989d..c54669c29 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -182,6 +182,11 @@
        * src/roff/troff/env.cpp (environment::wrap_up_tab): Assign
        Boolean literal to it.
 
+       * src/roff/troff/env.h (class environment):
+       * src/roff/troff/env.cpp (environment::add_tab): Rename
+       parameter `repeated` to `is_repeated` and demote it from `int`
+       to `bool`.
+
 2024-04-24  G. Branden Robinson <g.branden.robin...@gmail.com>
 
        * src/roff/troff/env.cpp (tab_stops::to_string)
diff --git a/src/roff/troff/env.cpp b/src/roff/troff/env.cpp
index 63cb1b36c..8146d2620 100644
--- a/src/roff/troff/env.cpp
+++ b/src/roff/troff/env.cpp
@@ -2840,10 +2840,11 @@ void tab_stops::clear()
   }
 }
 
-void tab_stops::add_tab(hunits pos, tab_type type, int repeated)
+void tab_stops::add_tab(hunits pos, tab_type type, bool is_repeated)
 {
   tab **p;
-  for (p = repeated ? &repeated_list : &initial_list; *p; p = &(*p)->next)
+  for (p = is_repeated ? &repeated_list : &initial_list; *p;
+       p = &(*p)->next)
     ;
   *p = new tab(pos, type);
 }
diff --git a/src/roff/troff/env.h b/src/roff/troff/env.h
index 60a84fc96..0bce8a5a7 100644
--- a/src/roff/troff/env.h
+++ b/src/roff/troff/env.h
@@ -87,7 +87,7 @@ public:
   tab_type distance_to_next_tab(hunits pos, hunits *distance);
   tab_type distance_to_next_tab(hunits curpos, hunits *distance, hunits 
*leftpos);
   void clear();
-  void add_tab(hunits pos, tab_type type, int repeated);
+  void add_tab(hunits pos, tab_type type, bool is_repeated);
   const char *to_string();
 };
 

_______________________________________________
Groff-commit mailing list
Groff-commit@gnu.org
https://lists.gnu.org/mailman/listinfo/groff-commit

Reply via email to