gbranden pushed a commit to branch master
in repository groff.
commit 81a6ed6e88b85dbc8c46d7c29bcefe2db00d9599
Author: G. Branden Robinson <[email protected]>
AuthorDate: Wed Aug 14 13:57:01 2024 -0500
[t5off]: Slightly refactor (5/6).
* src/roff/troff/node.h (class hmotion_node): Demote `was_tab` member
from `unsigned char` to `bool`. Use Boolean literals for it in
constructors' initializer lists.
---
ChangeLog | 4 ++++
src/roff/troff/node.h | 10 +++++-----
2 files changed, 9 insertions(+), 5 deletions(-)
diff --git a/ChangeLog b/ChangeLog
index e35ebe9fc..a0c8671d4 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -39,6 +39,10 @@
(word_space_node::word_space_node): Update data type in
constructor's argument list.
+ * src/roff/troff/node.h (class hmotion_node): Demote `was_tab`
+ member from `unsigned char` to `bool`. Use Boolean literals for
+ it in constructors' initializer lists.
+
2024-08-14 G. Branden Robinson <[email protected]>
* src/roff/troff/token.h (token:ch()): Return character instead
diff --git a/src/roff/troff/node.h b/src/roff/troff/node.h
index d0650402c..a7a89d1f8 100644
--- a/src/roff/troff/node.h
+++ b/src/roff/troff/node.h
@@ -325,21 +325,21 @@ public:
class hmotion_node : public node {
protected:
hunits n;
- unsigned char was_tab;
+ bool was_tab;
bool unformat;
color *col; /* for grotty */
public:
hmotion_node(hunits i, color *c, node *nxt = 0 /* nullptr */)
- : node(nxt), n(i), was_tab(0), unformat(false), col(c) {}
+ : node(nxt), n(i), was_tab(false), unformat(false), col(c) {}
hmotion_node(hunits i, color *c, statem *s, int divlevel,
node *nxt = 0 /* nullptr */)
- : node(nxt, s, divlevel), n(i), was_tab(0), unformat(false),
+ : node(nxt, s, divlevel), n(i), was_tab(false), unformat(false),
col(c) {}
- hmotion_node(hunits i, int flag1, bool flag2, color *c, statem *s,
+ hmotion_node(hunits i, bool flag1, bool flag2, color *c, statem *s,
int divlevel, node *nxt = 0 /* nullptr */)
: node(nxt, s, divlevel), n(i), was_tab(flag1), unformat(flag2),
col(c) {}
- hmotion_node(hunits i, int flag1, bool flag2, color *c,
+ hmotion_node(hunits i, bool flag1, bool flag2, color *c,
node *nxt = 0 /* nullptr */)
: node(nxt), n(i), was_tab(flag1), unformat(flag2), col(c) {}
node *copy();
_______________________________________________
Groff-commit mailing list
[email protected]
https://lists.gnu.org/mailman/listinfo/groff-commit