We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 9b91443 commit f8e8cd7Copy full SHA for f8e8cd7
src/util/std_types.h
@@ -390,17 +390,6 @@ class class_typet:public struct_typet
390
bases().push_back(baset(base));
391
}
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
/// Return the base with the given name, if exists.
405
/// \param id The name of the base we are looking for.
406
/// \return The base if exists.
@@ -417,6 +406,11 @@ class class_typet:public struct_typet
417
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);
0 commit comments