gbranden pushed a commit to branch master
in repository groff.
commit 678bb237a619c127debedb2bc899045691c48d4d
Author: G. Branden Robinson <[email protected]>
AuthorDate: Sat Apr 27 12:46:34 2024 -0500
[troff]: Boolify env.cpp (25/25).
[troff]: Boolify more `environment` class member variables, member
function parameters, and local variables.
* src/roff/troff/env.cpp (environment::hyphenate_line): Demote local
variable `inhibit` from `int` to `bool`.
---
ChangeLog | 3 +++
src/roff/troff/env.cpp | 3 ++-
2 files changed, 5 insertions(+), 1 deletion(-)
diff --git a/ChangeLog b/ChangeLog
index c54669c29..9b4d09234 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -187,6 +187,9 @@
parameter `repeated` to `is_repeated` and demote it from `int`
to `bool`.
+ * src/roff/troff/env.cpp (environment::hyphenate_line): Demote
+ local variable `inhibit` from `int` to `bool`.
+
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 8146d2620..523efdc00 100644
--- a/src/roff/troff/env.cpp
+++ b/src/roff/troff/env.cpp
@@ -2106,7 +2106,8 @@ void environment::hyphenate_line(bool must_break_here)
do {
tem = tem->next;
} while (tem != 0 && tem->get_hyphenation_type() == HYPHEN_MIDDLE);
- int inhibit = (tem != 0 && tem->get_hyphenation_type() == HYPHEN_INHIBIT);
+ bool inhibit = (tem != 0 /* nullptr */
+ && tem->get_hyphenation_type() == HYPHEN_INHIBIT);
node *end = tem;
hyphen_list *sl = 0;
tem = *startp;
_______________________________________________
Groff-commit mailing list
[email protected]
https://lists.gnu.org/mailman/listinfo/groff-commit