gbranden pushed a commit to branch master
in repository groff.

commit 09ccf4639b33b024157c414b9c876a250d3026e8
Author: G. Branden Robinson <[email protected]>
AuthorDate: Tue Apr 14 08:25:01 2026 -0500

    src/roff/troff/div.cpp: Drop unused code (3/5).
    
    ...introduced in initial commit 351da0dcd, 1991-06-02.  Since the `.h`
    register is interpolated only by its `get_string()` member function and
    never `get_value()` (and nothing internally to the formatter attempts to
    get at it by that means, since accessing the datum via
    `curdiv->get_high_water_mark()` is more straightforward), we can drop
    the latter.
    
    * src/roff/troff/div.cpp (class high_water_mark_reg): Drop `get_value()`
      declaration.
    
      (high_water_mark_reg::get_value): Delete.
---
 ChangeLog              | 13 +++++++++++++
 src/roff/troff/div.cpp |  7 -------
 2 files changed, 13 insertions(+), 7 deletions(-)

diff --git a/ChangeLog b/ChangeLog
index b394049ff..da8c13010 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,16 @@
+2026-04-14  G. Branden Robinson <[email protected]>
+
+       * src/roff/troff/div.cpp: Drop unused code introduced in initial
+       commit 351da0dcd, 1991-06-02.  Since the `.h` register is
+       interpolated only by its `get_string()` member function and
+       never `get_value()` (and nothing internally to the formatter
+       attempts to get at it by that means, since accessing the datum
+       via `curdiv->get_high_water_mark()` is more straightforward),
+       we can drop the latter.
+
+       (class high_water_mark_reg): Drop `get_value()` declaration.
+       (high_water_mark_reg::get_value): Delete.
+
 2026-04-14  G. Branden Robinson <[email protected]>
 
        * src/roff/troff/div.cpp: Drop unused code introduced in initial
diff --git a/src/roff/troff/div.cpp b/src/roff/troff/div.cpp
index 2daeb811a..ea2013153 100644
--- a/src/roff/troff/div.cpp
+++ b/src/roff/troff/div.cpp
@@ -1132,16 +1132,9 @@ const char *vertical_position_reg::get_string()
 
 class high_water_mark_reg : public reg {
 public:
-  bool get_value(units *);
   const char *get_string();
 };
 
-bool high_water_mark_reg::get_value(units *res)
-{
-  *res = curdiv->get_high_water_mark().to_units();
-  return true;
-}
-
 const char *high_water_mark_reg::get_string()
 {
   return i_to_a(curdiv->get_high_water_mark().to_units());

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

Reply via email to