[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[groff] 04/10: [troff]: Mark `H0`, `V0` objects as `const`.
From: |
G. Branden Robinson |
Subject: |
[groff] 04/10: [troff]: Mark `H0`, `V0` objects as `const`. |
Date: |
Mon, 6 Sep 2021 15:01:23 -0400 (EDT) |
gbranden pushed a commit to branch master
in repository groff.
commit 0b0d0bd0c5f6dae5b1b4325a5b5c5c4304200726
Author: G. Branden Robinson <g.branden.robinson@gmail.com>
AuthorDate: Sun Sep 5 07:25:12 2021 +1000
[troff]: Mark `H0`, `V0` objects as `const`.
* src/roff/troff/hvunits.h:
* src/roff/groff/number.cpp: Mark `H0`, `V0` objects as `const`.
---
ChangeLog | 5 +++++
src/roff/troff/hvunits.h | 4 ++--
src/roff/troff/number.cpp | 4 ++--
3 files changed, 9 insertions(+), 4 deletions(-)
diff --git a/ChangeLog b/ChangeLog
index 025d6dd..4da047e 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,10 @@
2021-09-05 G. Branden Robinson <g.branden.robinson@gmail.com>
+ * src/roff/troff/hvunits.h:
+ * src/roff/groff/number.cpp: Mark `H0`, `V0` objects as `const`.
+
+2021-09-05 G. Branden Robinson <g.branden.robinson@gmail.com>
+
* src/roff/troff/env.cpp (do_underline_special): Refactor
slightly.
- Rename `underline_spaces` -> `do_underline_spaces`.
diff --git a/src/roff/troff/hvunits.h b/src/roff/troff/hvunits.h
index 4927f71..e47a0a0 100644
--- a/src/roff/troff/hvunits.h
+++ b/src/roff/troff/hvunits.h
@@ -44,7 +44,7 @@ public:
friend inline int operator !=(const vunits&, const vunits&);
};
-extern vunits V0;
+extern const vunits V0;
class hunits {
@@ -73,7 +73,7 @@ public:
friend inline int operator !=(const hunits&, const hunits&);
};
-extern hunits H0;
+extern const hunits H0;
extern int get_vunits(vunits *, unsigned char si);
extern int get_hunits(hunits *, unsigned char si);
diff --git a/src/roff/troff/number.cpp b/src/roff/troff/number.cpp
index 825bc9a..b11c13c 100644
--- a/src/roff/troff/number.cpp
+++ b/src/roff/troff/number.cpp
@@ -26,8 +26,8 @@ along with this program. If not, see
<http://www.gnu.org/licenses/>. */
#include "token.h"
#include "div.h"
-vunits V0;
-hunits H0;
+const vunits V0; // zero in vertical units
+const hunits H0; // zero in horizontal units
int hresolution = 1;
int vresolution = 1;
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [groff] 04/10: [troff]: Mark `H0`, `V0` objects as `const`.,
G. Branden Robinson <=