summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorG. Branden Robinson <g.branden.robinson@gmail.com>2024-03-07 07:03:41 -0600
committerG. Branden Robinson <g.branden.robinson@gmail.com>2024-03-07 17:21:07 -0600
commite6f119c36ba820a13c00842f1dccb799ef59d4cd (patch)
tree6ef8ede0922a7fee4d9e34dbf1ca855959e3ad25
parent2fa56ec84577fcc37d6f38f650b3e42a2d072bd5 (diff)
[troff]: Fix code style nit (C++-style type cast).
* src/roff/troff/input.cpp (is_usable_as_delimiter): Fix code style nit, using C++-style type cast instead of C-style cast.
-rw-r--r--ChangeLog5
-rw-r--r--src/roff/troff/input.cpp3
2 files changed, 7 insertions, 1 deletions
diff --git a/ChangeLog b/ChangeLog
index 02a9c4e46..2a9be3b86 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,10 @@
2024-03-07 G. Branden Robinson <g.branden.robinson@gmail.com>
+ * src/roff/troff/input.cpp (is_usable_as_delimiter): Fix code
+ style nit, using C++-style type cast instead of C-style cast.
+
+2024-03-07 G. Branden Robinson <g.branden.robinson@gmail.com>
+
* src/roff/troff/input.cpp (get_char_for_escape_parameter):
Slightly refactor. Assert that the character handed to us by
our caller is not a newline. Consequently, drop newline
diff --git a/src/roff/troff/input.cpp b/src/roff/troff/input.cpp
index 2fbbe9106..7fa0e08d4 100644
--- a/src/roff/troff/input.cpp
+++ b/src/roff/troff/input.cpp
@@ -2475,6 +2475,7 @@ int token::operator!=(const token &t)
// is token a suitable delimiter (like ')?
+// Is the current token a suitable delimiter (like `'`)?
bool token::is_usable_as_delimiter(bool report_error)
{
switch(type) {
@@ -2505,7 +2506,7 @@ bool token::is_usable_as_delimiter(bool report_error)
case '.':
if (report_error)
error("character '%1' is not allowed as a starting delimiter",
- char(c));
+ static_cast<char>(c));
return false;
default:
return true;