@@ -1122,29 +1122,14 @@ inline incomplete_array_typet &to_incomplete_array_type(typet &type)
1122
1122
// / Superclass of anything represented by bits, for example integers (in 32
1123
1123
// / or 64-bit representation), floating point numbers etc. In contrast, \ref
1124
1124
// / integer_typet is a direct integer representation.
1125
- class bitvector_typet : public type_with_subtypet
1125
+ class bitvector_typet : public typet
1126
1126
{
1127
1127
public:
1128
- explicit bitvector_typet (const irep_idt &_id):type_with_subtypet (_id)
1128
+ explicit bitvector_typet (const irep_idt &_id) : typet (_id)
1129
1129
{
1130
1130
}
1131
1131
1132
- bitvector_typet (const irep_idt &_id, const typet &_subtype):
1133
- type_with_subtypet (_id, _subtype)
1134
- {
1135
- }
1136
-
1137
- bitvector_typet (
1138
- const irep_idt &_id,
1139
- const typet &_subtype,
1140
- std::size_t width):
1141
- type_with_subtypet (_id, _subtype)
1142
- {
1143
- set_width (width);
1144
- }
1145
-
1146
- bitvector_typet (const irep_idt &_id, std::size_t width):
1147
- type_with_subtypet (_id)
1132
+ bitvector_typet (const irep_idt &_id, std::size_t width) : typet(_id)
1148
1133
{
1149
1134
set_width (width);
1150
1135
}
@@ -1485,12 +1470,15 @@ inline floatbv_typet &to_floatbv_type(typet &type)
1485
1470
}
1486
1471
1487
1472
// / Type for C bit fields
1473
+ // / These are both 'bitvector_typet' (they have a width)
1474
+ // / and 'type_with_subtypet' (they have a subtype)
1488
1475
class c_bit_field_typet :public bitvector_typet
1489
1476
{
1490
1477
public:
1491
- explicit c_bit_field_typet (const typet &subtype , std::size_t width):
1492
- bitvector_typet(ID_c_bit_field, subtype , width)
1478
+ explicit c_bit_field_typet (const typet &_subtype , std::size_t width)
1479
+ : bitvector_typet(ID_c_bit_field, width)
1493
1480
{
1481
+ subtype () = _subtype;
1494
1482
}
1495
1483
1496
1484
// These have a sub-type
@@ -1527,12 +1515,15 @@ inline c_bit_field_typet &to_c_bit_field_type(typet &type)
1527
1515
}
1528
1516
1529
1517
// / The pointer type
1518
+ // / These are both 'bitvector_typet' (they have a width)
1519
+ // / and 'type_with_subtypet' (they have a subtype)
1530
1520
class pointer_typet :public bitvector_typet
1531
1521
{
1532
1522
public:
1533
- pointer_typet (const typet &_subtype, std::size_t width):
1534
- bitvector_typet (ID_pointer, _subtype , width)
1523
+ pointer_typet (const typet &_subtype, std::size_t width)
1524
+ : bitvector_typet(ID_pointer, width)
1535
1525
{
1526
+ subtype () = _subtype;
1536
1527
}
1537
1528
1538
1529
signedbv_typet difference_type () const
0 commit comments