gbranden pushed a commit to branch master
in repository groff.

commit ce873b11caf9ed7cd335a902a0440ea59cf8b911
Author: G. Branden Robinson <[email protected]>
AuthorDate: Thu May 15 12:38:31 2025 -0500

    src/roff/troff/input.cpp: Fix code style nit 2/3.
    
    * src/roff/troff/input.cpp (charinfo::charinfo)
      (charinfo::get_unicode_code): Fix code style nit.  Use unsigned
      integer literals when initializing and comparing to "ASCII codes",
      which are of type `unsigned int`.
---
 ChangeLog                | 7 ++++---
 src/roff/troff/input.cpp | 4 ++--
 2 files changed, 6 insertions(+), 5 deletions(-)

diff --git a/ChangeLog b/ChangeLog
index 42781fc40..be0650cf8 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,8 +1,9 @@
 2025-05-15  G. Branden Robinson <[email protected]>
 
-       * src/roff/troff/input.cpp (charinfo::charinfo): Fix code style
-       nit.  Use unsigned integer literal when initializing character
-       flags, which are of type `unsigned int`.
+       * src/roff/troff/input.cpp (charinfo::charinfo)
+       (charinfo::get_unicode_code): Fix code style nit.  Use unsigned
+       integer literals when initializing and comparing to character
+       flags and "ASCII codes", which are of type `unsigned int`.
 
 2025-05-15  G. Branden Robinson <[email protected]>
 
diff --git a/src/roff/troff/input.cpp b/src/roff/troff/input.cpp
index d63e6b114..43c3e4bb9 100644
--- a/src/roff/troff/input.cpp
+++ b/src/roff/troff/input.cpp
@@ -10158,7 +10158,7 @@ int charinfo::next_index = 0;
 charinfo::charinfo(symbol s)
 : translation(0 /* nullptr */), mac(0 /* nullptr */),
   special_translation(TRANSLATE_NONE), hyphenation_code(0U),
-  flags(0U), ascii_code(0), asciify_code(0),
+  flags(0U), ascii_code(0U), asciify_code(0),
   is_not_found(false), is_transparently_translatable(true),
   translatable_as_input(false), mode(CHAR_NORMAL), nm(s)
 {
@@ -10169,7 +10169,7 @@ charinfo::charinfo(symbol s)
 
 int charinfo::get_unicode_code()
 {
-  if (ascii_code != '\0')
+  if (ascii_code != 0U)
     return ascii_code;
   return glyph_to_unicode(this);
 }

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

Reply via email to