* src/abg-comparison.cc (types_or_decls_equal::operator()): Pass
arguments by reference.
(class_diff::ensure_lookup_tables_populated): Expression
!A || (A && B) can be reduced to !A || B.
* src/abg-suppression.cc (suppression_matches_type_no_name):
Likewise.
Signed-off-by: Ondrej Oprala <ondrej.oprala@gmail.com>
struct types_or_decls_equal
{
bool
- operator()(const types_or_decls_type d1, const types_or_decls_type d2) const
+ operator()(const types_or_decls_type &d1, const types_or_decls_type &d2) const
{return d1.first == d2.first && d1.second == d2.second;}
};
// We assume that all the functions we look at here have ELF
// symbols.
if (!i->second->get_symbol()
- || (i->second->get_symbol()
- && s->lookup_function_symbol(*i->second->get_symbol())))
+ || s->lookup_function_symbol(*i->second->get_symbol()))
to_delete.push_back(i->first);
case type_suppression::STRUCT_TYPE_KIND:
{
class_decl_sptr klass = is_class_type(type);
- if (!klass || (klass && !klass->is_struct()))
+ if (!klass || !klass->is_struct())
matches = false;
}
break;