gbranden pushed a commit to branch master
in repository groff.

commit bbbdb873e875250a7dfb807b14d5404875e2b455
Author: G. Branden Robinson <[email protected]>
AuthorDate: Sun Nov 30 14:57:51 2025 -0600

    src/roff/troff/number.cpp: Slightly refactor.
    
    * src/roff/troff/number.cpp (is_valid_expression_start): Call
      `tok.skip_spaces()` instead of open-coding exactly what it does.
    
    Continues commit e8db201111, 19 November.
---
 ChangeLog                 | 6 ++++++
 src/roff/troff/number.cpp | 3 +--
 2 files changed, 7 insertions(+), 2 deletions(-)

diff --git a/ChangeLog b/ChangeLog
index 3b912300e..e483c6326 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,9 @@
+2025-11-30  G. Branden Robinson <[email protected]>
+
+       * src/roff/troff/number.cpp (is_valid_expression_start):
+       Slightly refactor.  Call `tok.skip_spaces()` instead of
+       open-coding exactly what it does.
+
 2025-11-30  G. Branden Robinson <[email protected]>
 
        * src/roff/troff/column.cpp [COLUMN] (column_justify)
diff --git a/src/roff/troff/number.cpp b/src/roff/troff/number.cpp
index 69ae1cf47..e775a3502 100644
--- a/src/roff/troff/number.cpp
+++ b/src/roff/troff/number.cpp
@@ -239,8 +239,7 @@ static incr_number_result get_incr_number(units *res, 
unsigned char si)
 
 static bool is_valid_expression_start()
 {
-  while (tok.is_space())
-    tok.next();
+  tok.skip_spaces();
   if (tok.is_newline()) {
     warning(WARN_MISSING, "numeric expression missing");
     return false;

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

Reply via email to