mirror of
				https://github.com/RGBCube/serenity
				synced 2025-10-31 15:12:45 +00:00 
			
		
		
		
	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<T> and downcast<T> helpers since they still provide good readability improvements. Note that unlike dynamic_cast<T>, downcast<T> does not fail in a recoverable way, but will assert if the object being casted is not a T.
This commit is contained in:
		
							parent
							
								
									7c3b6b10e4
								
							
						
					
					
						commit
						865f524d5b
					
				
					 116 changed files with 5 additions and 494 deletions
				
			
		|  | @ -67,7 +67,3 @@ private: | |||
| }; | ||||
| 
 | ||||
| } | ||||
| 
 | ||||
| AK_BEGIN_TYPE_TRAITS(Web::HTML::HTMLLinkElement) | ||||
| static bool is_type(const Web::DOM::Node& node) { return node.is_html_element() && downcast<Web::HTML::HTMLElement>(node).local_name() == Web::HTML::TagNames::link; } | ||||
| AK_END_TYPE_TRAITS() | ||||
|  |  | |||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue
	
	 Andreas Kling
						Andreas Kling