/* Initializes ITEM as a chart item of the specified CLASS. The new chart item
initially has the specified TITLE, which may be NULL if no title is yet
available. The caller retains ownership of TITLE.
/* Initializes ITEM as a chart item of the specified CLASS. The new chart item
initially has the specified TITLE, which may be NULL if no title is yet
available. The caller retains ownership of TITLE.
- output_item_init (&item->output_item, &chart_item_class);
- item->class = class;
- item->title = title != NULL ? xstrdup (title) : NULL;
+ *item = (struct chart_item) {
+ .output_item = OUTPUT_ITEM_INITIALIZER (&chart_item_class),
+ .class = class,
+ .title = title ? xstrdup (title) : NULL
+ };