groff-commit
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[groff] 08/12: [troff]: Declare a constant object as `const`.


From: G. Branden Robinson
Subject: [groff] 08/12: [troff]: Declare a constant object as `const`.
Date: Tue, 19 Nov 2024 20:33:12 -0500 (EST)

gbranden pushed a commit to branch master
in repository groff.

commit 9accbb3759c7c3d17f25ef165ee862aea8cadad8
Author: G. Branden Robinson <g.branden.robinson@gmail.com>
AuthorDate: Tue Nov 19 12:54:41 2024 -0600

    [troff]: Declare a constant object as `const`.
    
    * src/roff/troff/div.cpp (DIVERSION_LENGTH_MAX): Declare as `const`.
---
 ChangeLog              | 5 +++++
 src/roff/troff/div.cpp | 2 +-
 2 files changed, 6 insertions(+), 1 deletion(-)

diff --git a/ChangeLog b/ChangeLog
index 798f0d207..4d22ec3c0 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+2024-11-19  G. Branden Robinson <g.branden.robinson@gmail.com>
+
+       * src/roff/troff/div.cpp (DIVERSION_LENGTH_MAX): Declare as
+       `const`.
+
 2024-11-19  G. Branden Robinson <g.branden.robinson@gmail.com>
 
        * Makefile.am (EXTRA_DIST): Ship "ChangeLog.123".
diff --git a/src/roff/troff/div.cpp b/src/roff/troff/div.cpp
index bc2fdfde7..94f28efcd 100644
--- a/src/roff/troff/div.cpp
+++ b/src/roff/troff/div.cpp
@@ -246,7 +246,7 @@ macro_diversion::~macro_diversion()
   dn_reg_contents = vertical_position.to_units();
 }
 
-static int DIVERSION_LENGTH_MAX = INT_MAX;
+static const int DIVERSION_LENGTH_MAX = INT_MAX;
 
 vunits macro_diversion::distance_to_next_trap()
 {



reply via email to

[Prev in Thread] Current Thread [Next in Thread]