We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 8fdf63a commit c075086Copy full SHA for c075086
src/util/std_types.h
@@ -396,17 +396,6 @@ class class_typet:public struct_typet
396
bases().push_back(baset(base));
397
}
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
/// Return the base with the given name, if exists.
411
/// \param id The name of the base we are looking for.
412
/// \return The base if exists.
@@ -420,6 +409,11 @@ class class_typet:public struct_typet
420
return {};
421
422
+ 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);
0 commit comments