LibCore+LibGUI: Switch to using AK::is and AK::downcast

This commit is contained in:
Andreas Kling 2020-07-26 17:16:35 +02:00
commit e0b8b4ac67
Notes: sideshowbarker 2024-07-19 04:36:09 +09:00
14 changed files with 341 additions and 98 deletions

View file

@ -91,10 +91,6 @@ private:
}
template<>
inline bool Core::is<GUI::AbstractButton>(const Core::Object& object)
{
if (!is<GUI::Widget>(object))
return false;
return to<GUI::Widget>(object).is_abstract_button();
}
AK_BEGIN_TYPE_TRAITS(GUI::AbstractButton)
static bool is_type(const Core::Object& object) { return is<GUI::Widget>(object) && downcast<GUI::Widget>(object).is_abstract_button(); }
AK_END_TYPE_TRAITS()