gbranden pushed a commit to branch master
in repository groff.
commit a181c4110397cb4347a42546d3c050fbb92bb667
Author: G. Branden Robinson <[email protected]>
AuthorDate: Sun Jul 5 20:29:36 2026 -0500
src/roff/troff/node.cpp: Annotate code.
Annotate null pointer literals with `nullptr` comment to ease any future
transition to C++11, which defines it as a keyword.
---
src/roff/troff/node.cpp | 15 +++++++++------
1 file changed, 9 insertions(+), 6 deletions(-)
diff --git a/src/roff/troff/node.cpp b/src/roff/troff/node.cpp
index f3d41f0f0..3b14f2442 100644
--- a/src/roff/troff/node.cpp
+++ b/src/roff/troff/node.cpp
@@ -140,7 +140,7 @@ struct font_lookup_info {
};
font_lookup_info::font_lookup_info() : position(FONT_NOT_MOUNTED),
- requested_position(FONT_NOT_MOUNTED), requested_name(0)
+ requested_position(FONT_NOT_MOUNTED), requested_name(0 /* nullptr */)
{
}
@@ -1692,8 +1692,10 @@ void troff_output_file::trailer(vunits page_length)
}
troff_output_file::troff_output_file()
-: current_slant(0), current_height(0), current_fill_color(0),
- current_stroke_color(0), mounting_position_count(10), tbuf_len(0),
+: current_slant(0), current_height(0),
+ current_fill_color(0 /* nullptr */),
+ current_stroke_color(0 /* nullptr */),
+ mounting_position_count(10), tbuf_len(0),
has_page_begun(false), cur_div_level(0)
{
font_mounting_position = new symbol[mounting_position_count];
@@ -4486,8 +4488,8 @@ tfont *device_extension_node::get_tfont()
/* suppress_node */
suppress_node::suppress_node(int on_or_off, int issue_limits)
-: is_on(on_or_off), emit_limits(issue_limits), filename(0), position(0),
- image_id(0)
+: is_on(on_or_off), emit_limits(issue_limits),
+ filename(0 /* nullptr */), position(0), image_id(0)
{
}
@@ -4971,7 +4973,8 @@ width_list::width_list(hunits w, hunits s)
}
width_list::width_list(width_list *w)
-: width(w->width), sentence_width(w->sentence_width), next(0)
+: width(w->width), sentence_width(w->sentence_width),
+ next(0 /* nullptr */)
{
}
_______________________________________________
groff-commit mailing list
[email protected]
https://lists.gnu.org/mailman/listinfo/groff-commit