gbranden pushed a commit to branch master
in repository groff.
commit ac8f524392b2a3f2860b0b4fe658da32dce5a613
Author: G. Branden Robinson <[email protected]>
AuthorDate: Tue Apr 14 08:41:48 2026 -0500
src/roff/troff/div.cpp: Drop unused code (4/5).
...introduced in initial commit 351da0dcd, 1991-06-02. Since the `.d`
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_vertical_position()` is more straightforward), we can drop
the latter.
* src/roff/troff/div.cpp (class vertical_position_reg): Drop
`get_value()` declaration.
(vertical_position_reg::get_value): Delete.
---
ChangeLog | 13 +++++++++++++
src/roff/troff/div.cpp | 10 ----------
2 files changed, 13 insertions(+), 10 deletions(-)
diff --git a/ChangeLog b/ChangeLog
index da8c13010..f76108d4b 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 `.d` 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_vertical_position()` is more straightforward),
+ we can drop the latter.
+
+ (class vertical_position_reg): Drop `get_value()` declaration.
+ (vertical_position_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 ea2013153..c8cd47e1d 100644
--- a/src/roff/troff/div.cpp
+++ b/src/roff/troff/div.cpp
@@ -1109,19 +1109,9 @@ const char *page_length_reg::get_string()
class vertical_position_reg : public reg {
public:
- bool get_value(units *);
const char *get_string();
};
-bool vertical_position_reg::get_value(units *res)
-{
- if ((curdiv == topdiv) && (topdiv->before_first_page_status > 0))
- *res = -1;
- else
- *res = curdiv->get_vertical_position().to_units();
- return true;
-}
-
const char *vertical_position_reg::get_string()
{
if ((curdiv == topdiv) && (topdiv->before_first_page_status > 0))
_______________________________________________
groff-commit mailing list
[email protected]
https://lists.gnu.org/mailman/listinfo/groff-commit