[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[groff] 30/48: [troff]: Boolify env.cpp (21/25).
From: |
G. Branden Robinson |
Subject: |
[groff] 30/48: [troff]: Boolify env.cpp (21/25). |
Date: |
Sun, 28 Apr 2024 23:06:34 -0400 (EDT) |
gbranden pushed a commit to branch master
in repository groff.
commit 13838f2707332f4585b4c10b3720dafdd5a6fd13
Author: G. Branden Robinson <g.branden.robinson@gmail.com>
AuthorDate: Sat Apr 27 05:10:28 2024 -0500
[troff]: Boolify env.cpp (21/25).
[troff]: Boolify more `environment` class member variables, member
function parameters, and local variables.
* src/roff/troff/env.h (class environment):
* src/roff/troff/env.cpp (environment::is_empty): Return a `bool`, not
an `int`.
---
ChangeLog | 4 ++++
src/roff/troff/env.cpp | 2 +-
src/roff/troff/env.h | 2 +-
3 files changed, 6 insertions(+), 2 deletions(-)
diff --git a/ChangeLog b/ChangeLog
index cb12fea06..0a637e4f4 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -164,6 +164,10 @@
* src/roff/troff/env.h (environment::is_dummy): Return a
`bool`, not an `int`.
+ * src/roff/troff/env.h (class environment):
+ * src/roff/troff/env.cpp (environment::is_empty): Return a
+ `bool`, not an `int`.
+
2024-04-24 G. Branden Robinson <g.branden.robinson@gmail.com>
* src/roff/troff/env.cpp (tab_stops::to_string)
diff --git a/src/roff/troff/env.cpp b/src/roff/troff/env.cpp
index 1e5f3b53c..d4db2ba69 100644
--- a/src/roff/troff/env.cpp
+++ b/src/roff/troff/env.cpp
@@ -2515,7 +2515,7 @@ void environment::do_break(bool want_adjustment)
}
}
-int environment::is_empty()
+bool environment::is_empty()
{
return !current_tab && line == 0 && pending_lines == 0;
}
diff --git a/src/roff/troff/env.h b/src/roff/troff/env.h
index 68b82e9a4..35962d7df 100644
--- a/src/roff/troff/env.h
+++ b/src/roff/troff/env.h
@@ -269,7 +269,7 @@ public:
void print_env();
void copy(const environment *);
bool is_dummy() { return dummy; }
- int is_empty();
+ bool is_empty();
bool is_composite() { return composite; }
void set_composite() { composite = true; }
vunits get_vertical_spacing(); // .v
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [groff] 30/48: [troff]: Boolify env.cpp (21/25).,
G. Branden Robinson <=