gbranden pushed a commit to branch master
in repository groff.

commit a197490e0d993c87471ce2c9b82c485cb0220ebd
Author: G. Branden Robinson <[email protected]>
AuthorDate: Sat Apr 27 06:28:06 2024 -0500

    [troff]: Boolify env.cpp (23/25).
    
    [troff]: Boolify more `environment` class member variables, member
    function parameters, and local variables.
    
    * src/roff/troff/env.h (class environment): Demote member variable
      `tab_precedes_field` from `int` to `bool`.
    * src/roff/troff/env.cpp (environment::wrap_up_tab): Assign Boolean
      literal to it.
---
 ChangeLog              | 5 +++++
 src/roff/troff/env.cpp | 2 +-
 src/roff/troff/env.h   | 2 +-
 3 files changed, 7 insertions(+), 2 deletions(-)

diff --git a/ChangeLog b/ChangeLog
index cb2f4bc41..e71f2989d 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -177,6 +177,11 @@
        `have_keyword` from `int` to `bool`.  Assign Boolean literals to
        them.
 
+       * src/roff/troff/env.h (class environment): Demote member
+       variable `tab_precedes_field` from `int` to `bool`.
+       * src/roff/troff/env.cpp (environment::wrap_up_tab): Assign
+       Boolean literal to it.
+
 2024-04-24  G. Branden Robinson <[email protected]>
 
        * src/roff/troff/env.cpp (tab_stops::to_string)
diff --git a/src/roff/troff/env.cpp b/src/roff/troff/env.cpp
index 8e9c06249..63cb1b36c 100644
--- a/src/roff/troff/env.cpp
+++ b/src/roff/troff/env.cpp
@@ -2980,7 +2980,7 @@ void environment::wrap_up_tab()
   if (has_current_field) {
     if (tab_precedes_field) {
       pre_field_width += tab_amount;
-      tab_precedes_field = 0;
+      tab_precedes_field = false;
     }
     field_distance -= tab_amount;
     field_spaces += tab_field_spaces;
diff --git a/src/roff/troff/env.h b/src/roff/troff/env.h
index 35962d7df..60a84fc96 100644
--- a/src/roff/troff/env.h
+++ b/src/roff/troff/env.h
@@ -199,7 +199,7 @@ class environment {
   hunits pre_field_width;
   int field_spaces;
   int tab_field_spaces;
-  int tab_precedes_field;
+  bool tab_precedes_field;
   bool discarding;
   bool spreading;              // set by \p
   unsigned margin_character_flags;

_______________________________________________
Groff-commit mailing list
[email protected]
https://lists.gnu.org/mailman/listinfo/groff-commit

Reply via email to