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 @@ -390,17 +390,6 @@ class class_typet:public struct_typet
390
390
bases ().push_back (baset (base));
391
391
}
392
392
393
- bool has_base (const irep_idt &id) const
394
- {
395
- for (const auto &b : bases ())
396
- {
397
- if (to_symbol_type (b.type ()).get (ID_identifier)==id)
398
- return true ;
399
- }
400
-
401
- return false ;
402
- }
403
-
404
393
// / Return the base with the given name, if exists.
405
394
// / \param id The name of the base we are looking for.
406
395
// / \return The base if exists.
@@ -417,6 +406,11 @@ class class_typet:public struct_typet
417
406
return {};
418
407
}
419
408
409
+ bool has_base (const irep_idt &id) const
410
+ {
411
+ return get_base (id).has_value ();
412
+ }
413
+
420
414
bool is_abstract () const
421
415
{
422
416
return get_bool (ID_abstract);
You can’t perform that action at this time.
0 commit comments