From: Tom Tromey Date: Sat, 11 Jan 2025 18:35:15 +0000 (-0700) Subject: Use bool in decode_line_2_item X-Git-Tag: binutils-2_44~134 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=fa4ea7a124194cacc74516d5b851f4eebbe7034d;p=thirdparty%2Fbinutils-gdb.git Use bool in decode_line_2_item 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. Approved-By: Simon Marchi --- diff --git a/gdb/linespec.c b/gdb/linespec.c index 056fbc73a32..5eef96c44e7 100644 --- a/gdb/linespec.c +++ b/gdb/linespec.c @@ -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 {