mirror of
				https://github.com/RGBCube/serenity
				synced 2025-10-31 06:02:44 +00:00 
			
		
		
		
	AK: Add JsonArray(const Vector<T>) constructor
This simplifies creating a JsonArray from a Vector<T> (when there's a JsonValue(T) constructor overload for T, that is).
This commit is contained in:
		
							parent
							
								
									4839f36f5e
								
							
						
					
					
						commit
						e83799dc02
					
				
					 1 changed files with 7 additions and 0 deletions
				
			
		|  | @ -47,6 +47,13 @@ public: | |||
|     { | ||||
|     } | ||||
| 
 | ||||
|     template<typename T> | ||||
|     JsonArray(const Vector<T>& vector) | ||||
|     { | ||||
|         for (auto& value : vector) | ||||
|             m_values.append(move(value)); | ||||
|     } | ||||
| 
 | ||||
|     JsonArray& operator=(const JsonArray& other) | ||||
|     { | ||||
|         if (this != &other) | ||||
|  |  | |||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue
	
	 Linus Groh
						Linus Groh