While looking around, I found some things in need of a cleanup. This
patch addresses those.
* src/abg-ir.cc (class_decl::priv::unmark_as_being_compared): In
the overload that takes a pointer to class_decl, re-use the
overload that takes a reference.
(class_decl::priv::comparison_started): Do not crash if the klass
pointer is nil.
(equals): In the overload for class_decl&, undef the RESULT macro
when it's not used anymore.
Signed-off-by: Dodji Seketeli <dodji@redhat.com>
void
unmark_as_being_compared(const class_decl* klass) const
{
- const environment* env = klass->get_environment();
- assert(env);
- env->priv_->classes_being_compared_.erase(klass->get_qualified_name());
+ if (klass)
+ return unmark_as_being_compared(*klass);
}
/// Test if a given instance of class_decl is being currently
/// @return true if @p klass is being compared, false otherwise.
bool
comparison_started(const class_decl* klass) const
- {return comparison_started(*klass);}
+ {
+ if (klass)
+ return comparison_started(*klass);
+ return false;
+ }
};// end struct class_decl::priv
/// A Constructor for instances of \ref class_decl
}
RETURN(result);
+#undef RETURN
}
/// Comparison operator for @ref class_decl.