From 865f524d5b1257ec77b2d17b93ec777799b4c4ab Mon Sep 17 00:00:00 2001 From: Andreas Kling Date: Fri, 1 Jan 2021 15:33:30 +0100 Subject: AK+LibGUI+LibWeb: Remove AK::TypeTraits in favor of RTTI-based helpers Now that we have RTTI in userspace, we can do away with all this manual hackery and use dynamic_cast. We keep the is and downcast helpers since they still provide good readability improvements. Note that unlike dynamic_cast, downcast does not fail in a recoverable way, but will assert if the object being casted is not a T. --- DevTools/HackStudio/EditorWrapper.h | 4 ---- 1 file changed, 4 deletions(-) (limited to 'DevTools') diff --git a/DevTools/HackStudio/EditorWrapper.h b/DevTools/HackStudio/EditorWrapper.h index 38f24c0984..0cf67032a2 100644 --- a/DevTools/HackStudio/EditorWrapper.h +++ b/DevTools/HackStudio/EditorWrapper.h @@ -58,7 +58,3 @@ private: }; } - -AK_BEGIN_TYPE_TRAITS(HackStudio::EditorWrapper) -static bool is_type(const Core::Object& object) { return !strcmp(object.class_name(), "EditorWrapper"); } -AK_END_TYPE_TRAITS() -- cgit v1.2.3