mirror of
				https://github.com/RGBCube/serenity
				synced 2025-10-31 15:12:45 +00:00 
			
		
		
		
	AK: Add comparison operators to NonnullOwnPtr
This commit is contained in:
		
							parent
							
								
									709f0a2ab3
								
							
						
					
					
						commit
						50c88e5e3a
					
				
					 1 changed files with 6 additions and 0 deletions
				
			
		|  | @ -135,6 +135,12 @@ public: | |||
|         return NonnullOwnPtr<U>(NonnullOwnPtr<U>::Adopt, static_cast<U&>(*leak_ptr())); | ||||
|     } | ||||
| 
 | ||||
|     bool operator==(NonnullOwnPtr const& other) const { return m_ptr == other.m_ptr; } | ||||
|     bool operator!=(NonnullOwnPtr const& other) const { return m_ptr != other.m_ptr; } | ||||
| 
 | ||||
|     bool operator==(NonnullOwnPtr& other) { return m_ptr == other.m_ptr; } | ||||
|     bool operator!=(NonnullOwnPtr& other) { return m_ptr != other.m_ptr; } | ||||
| 
 | ||||
| private: | ||||
|     void clear() | ||||
|     { | ||||
|  |  | |||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue
	
	 Allan Regush
						Allan Regush