File tree 1 file changed +12
-8
lines changed
1 file changed +12
-8
lines changed Original file line number Diff line number Diff line change @@ -261,14 +261,18 @@ void java_bytecode_convert_classt::add_array_types()
261
261
// we have the base class, java.lang.Object, length and data
262
262
// of appropriate type
263
263
struct_type.set_tag (symbol_type.get_identifier ());
264
- struct_type.components ().resize (3 );
265
- struct_type.components ()[0 ].set_name (" @java.lang.Object" );
266
- struct_type.components ()[0 ].type ()=symbol_typet (" java::java.lang.Object" );
267
- struct_type.components ()[1 ].set_name (" length" );
268
- struct_type.components ()[1 ].type ()=java_int_type ();
269
- struct_type.components ()[2 ].set_name (" data" );
270
- struct_type.components ()[2 ].type ()=
271
- pointer_typet (java_type_from_char (letters[i]));
264
+
265
+ struct_type.components ().reserve (3 );
266
+ struct_typet::componentt
267
+ comp0 (" @java.lang.Object" , symbol_typet (" java::java.lang.Object" ));
268
+ struct_type.components ().push_back (comp0);
269
+
270
+ struct_typet::componentt comp1 (" length" , java_int_type ());
271
+ struct_type.components ().push_back (comp1);
272
+
273
+ struct_typet::componentt
274
+ comp2 (" data" , pointer_typet (java_type_from_char (l)));
275
+ struct_type.components ().push_back (comp2);
272
276
273
277
symbolt symbol;
274
278
symbol.name =symbol_type.get_identifier ();
You can’t perform that action at this time.
0 commit comments