gbranden pushed a commit to branch master
in repository groff.

commit 9173b969a51f929d87b7c79ff91c7e98c4b4d625
Author: G. Branden Robinson <[email protected]>
AuthorDate: Sun Nov 30 05:40:20 2025 -0600

    src/roff/troff/input.cpp: Fix code style nit (1).
    
    * src/roff/troff/input.cpp (warnscale_request): Favor value constructors
      over C-style type casts.
---
 ChangeLog                |  5 +++++
 src/roff/troff/input.cpp | 10 +++++-----
 2 files changed, 10 insertions(+), 5 deletions(-)

diff --git a/ChangeLog b/ChangeLog
index 5c6adff8e..7b58d42b0 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+2025-11-30  G. Branden Robinson <[email protected]>
+
+       * src/roff/troff/input.cpp (warnscale_request): Fix code style
+       nit.  Favor value constructors over C-style type casts.
+
 2025-11-30  G. Branden Robinson <[email protected]>
 
        * src/roff/troff/input.cpp (warnscale_request): In warning
diff --git a/src/roff/troff/input.cpp b/src/roff/troff/input.cpp
index 94dd55d8e..eb61e032d 100644
--- a/src/roff/troff/input.cpp
+++ b/src/roff/troff/input.cpp
@@ -8326,19 +8326,19 @@ void warnscale_request()
   if (c == 'u')
     warn_scale = 1.0;
   else if (c == 'i')
-    warn_scale = (double) units_per_inch;
+    warn_scale = double(units_per_inch);
   else if (c == 'c')
-    warn_scale = (double) units_per_inch / 2.54;
+    warn_scale = double(units_per_inch / 2.54);
   else if (c == 'p')
-    warn_scale = (double) units_per_inch / 72.0;
+    warn_scale = double(units_per_inch / 72.0);
   else if (c == 'P')
-    warn_scale = (double) units_per_inch / 6.0;
+    warn_scale = double(units_per_inch / 6.0);
   else {
     warning(WARN_SCALE,
            "%1 is not a valid scaling unit; using 'i'",
            tok.description());
     c = 'i';
-    warn_scale = (double) units_per_inch;
+    warn_scale = double(units_per_inch);
   }
   warn_scaling_unit = c;
   skip_line();

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

Reply via email to