mirror of
				https://github.com/RGBCube/serenity
				synced 2025-10-31 19:22:45 +00:00 
			
		
		
		
	LibGfx: Add hash traits for the Size family
This commit is contained in:
		
							parent
							
								
									11b4216e65
								
							
						
					
					
						commit
						2484324f9a
					
				
					 1 changed files with 9 additions and 0 deletions
				
			
		|  | @ -220,3 +220,12 @@ template<> | |||
| ErrorOr<Gfx::IntSize> decode(Decoder&); | ||||
| 
 | ||||
| } | ||||
| 
 | ||||
| template<typename T> | ||||
| struct AK::Traits<Gfx::Size<T>> : public AK::DefaultTraits<Gfx::Size<T>> { | ||||
|     static constexpr bool is_trivial() { return false; } | ||||
|     static unsigned hash(Gfx::Size<T> const& size) | ||||
|     { | ||||
|         return pair_int_hash(AK::Traits<T>::hash(size.width()), AK::Traits<T>::hash(size.height())); | ||||
|     } | ||||
| }; | ||||
|  |  | |||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue
	
	 Andreas Kling
						Andreas Kling