mirror of
https://github.com/RGBCube/serenity
synced 2025-07-25 14:37:46 +00:00
LibCore+LibGUI: Switch to using AK::is and AK::downcast
This commit is contained in:
parent
71556e39a4
commit
e0b8b4ac67
14 changed files with 341 additions and 98 deletions
|
@ -55,10 +55,6 @@ private:
|
|||
|
||||
}
|
||||
|
||||
template<>
|
||||
inline bool Core::is<GUI::RadioButton>(const Core::Object& object)
|
||||
{
|
||||
if (!is<GUI::Widget>(object))
|
||||
return false;
|
||||
return to<GUI::Widget>(object).is_radio_button();
|
||||
}
|
||||
AK_BEGIN_TYPE_TRAITS(GUI::RadioButton)
|
||||
static bool is_type(const Core::Object& object) { return is<GUI::Widget>(object) && downcast<GUI::Widget>(object).is_radio_button(); }
|
||||
AK_END_TYPE_TRAITS()
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue