gbranden pushed a commit to branch master
in repository groff.
commit eac8988a8484949472aaf05441d46b5740c590c1
Author: G. Branden Robinson <[email protected]>
AuthorDate: Tue Nov 18 11:01:10 2025 -0600
src/roff/troff/input.cpp: Fix code style nit.
* src/roff/troff/input.cpp (charinfo::set_hyphenation_code): Fix code
style nit; explicitly compare value of pointer type to null pointer
literal instead of letting it pun down to a Boolean. In so doing,
parenthesize formally complex expression.
---
ChangeLog | 7 +++++++
src/roff/troff/input.cpp | 4 ++--
2 files changed, 9 insertions(+), 2 deletions(-)
diff --git a/ChangeLog b/ChangeLog
index 13c398d8e..c7b2e0e19 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,10 @@
+2025-11-15 G. Branden Robinson <[email protected]>
+
+ * src/roff/troff/input.cpp (charinfo::set_hyphenation_code): Fix
+ code style nit; explicitly compare value of pointer type to null
+ pointer literal instead of letting it pun down to a Boolean. In
+ so doing, parenthesize formally complex expression.
+
2025-11-18 G. Branden Robinson <[email protected]>
[troff]: Trivially refactor. Rename `get_name()` to
diff --git a/src/roff/troff/input.cpp b/src/roff/troff/input.cpp
index 54861dc39..ee16beee3 100644
--- a/src/roff/troff/input.cpp
+++ b/src/roff/troff/input.cpp
@@ -10557,7 +10557,7 @@ void charinfo::set_hyphenation_code(unsigned char c)
void charinfo::set_translation(charinfo *ci, int tt, int ti)
{
translation = ci;
- if (ci && ti) {
+ if ((ci != 0 /* nullptr */) && ti) {
if (hyphenation_code != 0U)
ci->set_hyphenation_code(hyphenation_code);
if (asciify_code != 0U)
@@ -10610,7 +10610,7 @@ void charinfo::get_flags()
void charinfo::set_special_translation(int c, int tt)
{
special_translation = c;
- translation = 0;
+ translation = 0 /* nullptr */;
is_transparently_translatable = tt;
}
_______________________________________________
groff-commit mailing list
[email protected]
https://lists.gnu.org/mailman/listinfo/groff-commit