Skip to content

Commit db1421f

Browse files
author
svorenova
committed
Utility functions cont. (to be squashed)
1 parent f8e8cd7 commit db1421f

File tree

1 file changed

+3
-6
lines changed

1 file changed

+3
-6
lines changed

src/util/std_types.h

+3-6
Original file line numberDiff line numberDiff line change
@@ -395,13 +395,10 @@ class class_typet:public struct_typet
395395
/// \return The base if exists.
396396
optionalt<baset> get_base(const irep_idt &id) const
397397
{
398-
if(has_base(id))
398+
for(const auto &b : bases())
399399
{
400-
for(const auto &b : bases())
401-
{
402-
if(to_symbol_type(b.type()).get_identifier() == id)
403-
return b;
404-
}
400+
if(to_symbol_type(b.type()).get_identifier() == id)
401+
return b;
405402
}
406403
return {};
407404
}

0 commit comments

Comments
 (0)