[2/2] Use bool in decode_line_2_item
Checks
Context |
Check |
Description |
linaro-tcwg-bot/tcwg_gdb_build--master-aarch64 |
success
|
Build passed
|
linaro-tcwg-bot/tcwg_gdb_build--master-arm |
success
|
Build passed
|
linaro-tcwg-bot/tcwg_gdb_check--master-aarch64 |
success
|
Test passed
|
linaro-tcwg-bot/tcwg_gdb_check--master-arm |
success
|
Test passed
|
Commit Message
This changes decode_line_2_item::selected to bool. There was no
benefit to keeping this as a bitfield, so I removed that. Note that
the constructor already uses bool here.
---
gdb/linespec.c | 7 +++----
1 file changed, 3 insertions(+), 4 deletions(-)
@@ -1378,9 +1378,8 @@ struct decode_line_2_item
/* The form using symtab_to_filename_for_display. */
std::string displayform;
- /* Field is initialized to zero and it is set to one if the user
- requested breakpoint for this entry. */
- unsigned int selected : 1;
+ /* True if the user requested breakpoint for this entry. */
+ bool selected;
};
/* Handle multiple results in RESULT depending on SELECT_MODE. This
@@ -1495,7 +1494,7 @@ decode_line_2 (struct linespec_state *self,
if (!item->selected)
{
filters.push_back (item->fullform.c_str ());
- item->selected = 1;
+ item->selected = true;
}
else
{