Skip to content

Commit c2de2f7

Browse files
committed
Use bool in update_enumeration_type_from_children
This is just a small preliminary cleanup to use 'bool' in update_enumeration_type_from_children.
1 parent 2b6e074 commit c2de2f7

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

gdb/dwarf2/read.c

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -11586,8 +11586,8 @@ update_enumeration_type_from_children (struct die_info *die,
1158611586
struct type *type,
1158711587
struct dwarf2_cu *cu)
1158811588
{
11589-
int unsigned_enum = 1;
11590-
int flag_enum = 1;
11589+
bool unsigned_enum = true;
11590+
bool flag_enum = true;
1159111591

1159211592
auto_obstack obstack;
1159311593
std::vector<struct field> fields;
@@ -11615,13 +11615,13 @@ update_enumeration_type_from_children (struct die_info *die,
1161511615
&value, &bytes, &baton);
1161611616
if (value < 0)
1161711617
{
11618-
unsigned_enum = 0;
11619-
flag_enum = 0;
11618+
unsigned_enum = false;
11619+
flag_enum = false;
1162011620
}
1162111621
else
1162211622
{
1162311623
if (count_one_bits_ll (value) >= 2)
11624-
flag_enum = 0;
11624+
flag_enum = false;
1162511625
}
1162611626

1162711627
struct field &field = fields.emplace_back ();
@@ -11632,7 +11632,7 @@ update_enumeration_type_from_children (struct die_info *die,
1163211632
if (!fields.empty ())
1163311633
type->copy_fields (fields);
1163411634
else
11635-
flag_enum = 0;
11635+
flag_enum = false;
1163611636

1163711637
if (unsigned_enum)
1163811638
type->set_is_unsigned (true);

0 commit comments

Comments
 (0)