File tree Expand file tree Collapse file tree 1 file changed +5
-11
lines changed Expand file tree Collapse file tree 1 file changed +5
-11
lines changed Original file line number Diff line number Diff line change @@ -396,17 +396,6 @@ class class_typet:public struct_typet
396
396
bases ().push_back (baset (base));
397
397
}
398
398
399
- bool has_base (const irep_idt &id) const
400
- {
401
- for (const auto &b : bases ())
402
- {
403
- if (to_symbol_type (b.type ()).get (ID_identifier)==id)
404
- return true ;
405
- }
406
-
407
- return false ;
408
- }
409
-
410
399
// / Return the base with the given name, if exists.
411
400
// / \param id The name of the base we are looking for.
412
401
// / \return The base if exists.
@@ -420,6 +409,11 @@ class class_typet:public struct_typet
420
409
return {};
421
410
}
422
411
412
+ bool has_base (const irep_idt &id) const
413
+ {
414
+ return get_base (id).has_value ();
415
+ }
416
+
423
417
bool is_abstract () const
424
418
{
425
419
return get_bool (ID_abstract);
You can’t perform that action at this time.
0 commit comments