gbranden pushed a commit to branch master
in repository groff.

commit 01977a62a666b292bbde4a868e5286017d02de31
Author: G. Branden Robinson <[email protected]>
AuthorDate: Tue Aug 13 04:49:16 2024 -0500

    src/roff/troff/mtsm.cpp: Annotate some null ptrs.
    
    Annotate null pointers with `nullptr` comment to ease any future
    transition to C++11, which defines it as a keyword.
---
 src/roff/troff/mtsm.cpp | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/src/roff/troff/mtsm.cpp b/src/roff/troff/mtsm.cpp
index d1418b22d..e1975155b 100644
--- a/src/roff/troff/mtsm.cpp
+++ b/src/roff/troff/mtsm.cpp
@@ -426,7 +426,7 @@ void mtsm::inherit(statem *s, int reset_bool)
 
 void mtsm::flush(FILE *fp, statem *s, string tag_list)
 {
-  if (is_writing_html && s) {
+  if (is_writing_html && (s != 0 /* nullptr */)) {
     inherit(s, 1);
     driver->flush(fp, s);
     // Set rj, ce, ti to unknown if they were known and
@@ -510,8 +510,8 @@ int mtsm::has_changed(string_value_state t, statem *s)
 
 int mtsm::changed(statem *s)
 {
-  if (s == 0 || !is_writing_html)
-    return 0;
+  if ((s == 0 /* nullptr */) || !is_writing_html)
+    return 0 /* nullptr */;
   s = new statem(s);
   inherit(s, 0);
   int result = has_changed(MTSM_EOL, s)

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

Reply via email to