]> git.ipfire.org Git - thirdparty/binutils-gdb.git/commitdiff
Use bool in decode_line_2_item
authorTom Tromey <tom@tromey.com>
Sat, 11 Jan 2025 18:35:15 +0000 (11:35 -0700)
committerTom Tromey <tom@tromey.com>
Tue, 14 Jan 2025 22:40:58 +0000 (15:40 -0700)
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 <simon.marchi@efficios.com>
gdb/linespec.c

index 056fbc73a3287e997ea916408f4d279cf2a1d12e..5eef96c44e7dc283c3855690359fd718fe2c0a55 100644 (file)
@@ -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
            {