gbranden pushed a commit to branch branden-2023-07-05
in repository groff.

commit 7c6237da257769950c44f0a0e6373ea19f8e3e3f
Author: G. Branden Robinson <[email protected]>
AuthorDate: Sat May 27 12:59:14 2023 -0500

    [troff]: Trivially refactor.
    
    * src/roff/troff/env.cpp (font_change): Simplify conditionals.
---
 ChangeLog              | 5 +++++
 src/roff/troff/env.cpp | 4 ++--
 2 files changed, 7 insertions(+), 2 deletions(-)

diff --git a/ChangeLog b/ChangeLog
index ce5d21e1a..a48a8b728 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+2023-05-30  G. Branden Robinson <[email protected]>
+
+       * src/roff/troff/env.cpp (font_change): Trivially refactor.
+       Simplify conditionals.
+
 2023-05-30  G. Branden Robinson <[email protected]>
 
        [eqn]: Trivially refactor.  Rename `check_tabs` member functions
diff --git a/src/roff/troff/env.cpp b/src/roff/troff/env.cpp
index a416b9525..ab214c764 100644
--- a/src/roff/troff/env.cpp
+++ b/src/roff/troff/env.cpp
@@ -1235,10 +1235,10 @@ void font_change()
 {
   symbol s = get_name();
   bool is_number = true;
-  if (s.is_null() || s == P_symbol) {
+  if (s.is_null())
     s = P_symbol;
+  if (s == P_symbol)
     is_number = false;
-  }
   else {
     for (const char *p = s.contents(); p != 0 && *p != 0; p++)
       if (!csdigit(*p)) {

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

Reply via email to