ui_out_table: Replace boolean flag with enum
authorSimon Marchi <simon.marchi@polymtl.ca>
Thu, 1 Dec 2016 21:10:45 +0000 (16:10 -0500)
committerSimon Marchi <simon.marchi@ericsson.com>
Thu, 1 Dec 2016 21:10:45 +0000 (16:10 -0500)
commit77a179e77b38161e461f5e37512f0b3fc3582181
tree30f3b1c6be9b3d0c8999eb87e8e0a7f33e6c225c
parent33b2fac610fff1255a24763277a4bf77f1b59ef1
ui_out_table: Replace boolean flag with enum

This patch is just a little cleanup, it replaces the body_flag field of
ui_out_table with an enum.  It expresses more explicitly the
intent of the field (check that state == TABLE_STATE_HEADERS conveys
more what we want to do than checking for !body_flag).

New in v2:

  - Remove unnecessary ui_out_table_state::.

gdb/ChangeLog:

* ui-out.c (enum ui_out_table_state): New enum.
(struct ui_out_table) <body_flag>: Remove field.
<state>: New field.
(ui_out_table_begin): Replace usages of body_flag with state.
(ui_out_table_body): Likewise.
(ui_out_table_end): Likewise.
(ui_out_table_header): Likewise.
(ui_out_begin): Likewise.
(verify_field): Likewise.
(ui_out_new): Likewise.
gdb/ChangeLog
gdb/ui-out.c
This page took 0.024062 seconds and 4 git commands to generate.