[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[groff] 03/26: [refer]: Trivially refactor.
From: |
G. Branden Robinson |
Subject: |
[groff] 03/26: [refer]: Trivially refactor. |
Date: |
Sun, 15 May 2022 05:07:52 -0400 (EDT) |
gbranden pushed a commit to branch master
in repository groff.
commit a0253886438d4d68a8d993429c278647660f5844
Author: G. Branden Robinson <g.branden.robinson@gmail.com>
AuthorDate: Wed May 4 18:50:45 2022 -0500
[refer]: Trivially refactor.
* src/preproc/refer/command.cpp (input_stack::push_file):
* src/preproc/refer/refer.cpp (do_file): Drop unnecessary construction
of integer from integer (return type of `getc()`) in argument to error
diagnostic functions; parallelizes with other diagnostic function
calls.
---
ChangeLog | 10 ++++++++++
src/preproc/refer/command.cpp | 2 +-
src/preproc/refer/refer.cpp | 2 +-
3 files changed, 12 insertions(+), 2 deletions(-)
diff --git a/ChangeLog b/ChangeLog
index 0774d8b5..c6dd271b 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,13 @@
+2022-05-04 G. Branden Robinson <g.branden.robinson@gmail.com>
+
+ [refer]: Trivially refactor.
+
+ * src/preproc/refer/command.cpp (input_stack::push_file):
+ * src/preproc/refer/refer.cpp (do_file): Drop unnecessary
+ construction of integer from integer (return type of `getc()`)
+ in argument to error diagnostic functions; parallelizes with
+ other diagnostic function calls.
+
2022-05-04 G. Branden Robinson <g.branden.robinson@gmail.com>
* src/preproc/refer/command.cpp: Refactor to simplify.
diff --git a/src/preproc/refer/command.cpp b/src/preproc/refer/command.cpp
index 08e05a6b..33cc2b10 100644
--- a/src/preproc/refer/command.cpp
+++ b/src/preproc/refer/command.cpp
@@ -194,7 +194,7 @@ void input_stack::push_file(const char *fn)
break;
if (invalid_input_char(c))
error_with_file_and_line(fn, lineno,
- "invalid input character code %1", int(c));
+ "invalid input character code %1", c);
else {
buf += c;
if (c == '\n') {
diff --git a/src/preproc/refer/refer.cpp b/src/preproc/refer/refer.cpp
index 90f8f0ff..ee784583 100644
--- a/src/preproc/refer/refer.cpp
+++ b/src/preproc/refer/refer.cpp
@@ -590,7 +590,7 @@ static void do_file(const char *filename)
break;
}
if (invalid_input_char(c))
- error("invalid input character code %1", int(c));
+ error("invalid input character code %1", c);
else {
line += c;
at_start_of_line = ('\n' == c);
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [groff] 03/26: [refer]: Trivially refactor.,
G. Branden Robinson <=