mirror of
				https://github.com/eledio-devices/thirdparty-ArduinoJson.git
				synced 2025-10-31 16:14:11 +01:00 
			
		
		
		
	Avoid pool reallocation in BasicJsonDocument's copy assignment
				
					
				
			This commit is contained in:
		| @@ -139,6 +139,9 @@ class BasicJsonDocument : AllocatorOwner<TAllocator>, public JsonDocument { | ||||
|   } | ||||
|  | ||||
|   void reallocPool(size_t requiredSize) { | ||||
|     size_t capa = addPadding(requiredSize); | ||||
|     if (capa == _pool.capacity()) | ||||
|       return; | ||||
|     freePool(); | ||||
|     replacePool(allocPool(addPadding(requiredSize))); | ||||
|   } | ||||
|   | ||||
		Reference in New Issue
	
	Block a user