gbranden pushed a commit to branch master
in repository groff.

commit beb995815161dfe8755107c277d81abe9fc3a3e0
Author: G. Branden Robinson <[email protected]>
AuthorDate: Fri Apr 10 09:00:53 2026 -0500

    src/roff/troff/env.cpp: Slightly refactor.
    
    * src/roff/troff/env.cpp (add_hyphenation_exception_words_request):
      Declare `const` symbols computed at compile time as `static`.
---
 ChangeLog              | 6 ++++++
 src/roff/troff/env.cpp | 4 ++--
 2 files changed, 8 insertions(+), 2 deletions(-)

diff --git a/ChangeLog b/ChangeLog
index 8713f2b4e..83fd28572 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,9 @@
+2026-04-10  G. Branden Robinson <[email protected]>
+
+       * src/roff/troff/env.cpp
+       (add_hyphenation_exception_words_request): Slightly refactor.
+       Declare `const` symbols computed at compile time as `static`.
+
 2026-04-10  G. Branden Robinson <[email protected]>
 
        * src/roff/troff/env.cpp
diff --git a/src/roff/troff/env.cpp b/src/roff/troff/env.cpp
index c4a2f26ef..15249f9ac 100644
--- a/src/roff/troff/env.cpp
+++ b/src/roff/troff/env.cpp
@@ -3928,12 +3928,12 @@ static void add_hyphenation_exception_words_request() 
// .hw
     return;
   }
   // C++11: constexpr
-  const size_t wordbuflen = WORD_MAX + 1 /* '\0' */;
+  static const size_t wordbuflen = WORD_MAX + 1 /* '\0' */;
   // C++11: char wordbuf[wordbuflen]{};
   char wordbuf[wordbuflen];
   (void) memset(wordbuf, 0, wordbuflen);
   // C++11: constexpr
-  const size_t bpbuflen = WORD_MAX + 2 /* leading '-' + '\0' */;
+  static const size_t bpbuflen = WORD_MAX + 2 /* leading '-' + '\0' */;
   // C++11: unsigned char bpbuf[bpbuflen]{};
   unsigned char bpbuf[bpbuflen];
   (void) memset(bpbuf, 0, bpbuflen);

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

Reply via email to