gbranden pushed a commit to branch master
in repository groff.

commit edce37ba635ebf798b7ce334fc3c693fefc28880
Author: G. Branden Robinson <[email protected]>
AuthorDate: Tue Apr 14 08:11:52 2026 -0500

    src/roff/troff/div.cpp: Drop unused code (2/5).
    
    ...introduced in initial commit 351da0dcd, 1991-06-02.  Since the
    `.t` 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->distance_to_next_trap()` is more straightforward), we can drop
    the latter.
    
    * src/roff/troff/div.cpp (class distance_to_next_trap_reg): Drop
      `get_value()` declaration.
    
      (distance_to_next_trap_reg::get_value): Delete.
---
 ChangeLog              | 14 ++++++++++++++
 src/roff/troff/div.cpp |  7 -------
 2 files changed, 14 insertions(+), 7 deletions(-)

diff --git a/ChangeLog b/ChangeLog
index c70d2b7d2..b394049ff 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,17 @@
+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 `.t` 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->distance_to_next_trap()` is more straightforward),
+       we can drop the latter.
+
+       (class distance_to_next_trap_reg): Drop `get_value()`
+       declaration.
+       (distance_to_next_trap_reg::get_value): Delete.
+
 2026-04-14  G. Branden Robinson <[email protected]>
 
        * src/roff/troff/div.cpp: Drop unused code introduced in commit
diff --git a/src/roff/troff/div.cpp b/src/roff/troff/div.cpp
index af7cda934..2daeb811a 100644
--- a/src/roff/troff/div.cpp
+++ b/src/roff/troff/div.cpp
@@ -1149,16 +1149,9 @@ const char *high_water_mark_reg::get_string()
 
 class distance_to_next_trap_reg : public reg {
 public:
-  bool get_value(units *);
   const char *get_string();
 };
 
-bool distance_to_next_trap_reg::get_value(units *res)
-{
-  *res = curdiv->distance_to_next_trap().to_units();
-  return true;
-}
-
 const char *distance_to_next_trap_reg::get_string()
 {
   return i_to_a(curdiv->distance_to_next_trap().to_units());

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

Reply via email to