mirror of
				https://github.com/eledio-devices/thirdparty-ArduinoJson.git
				synced 2025-10-31 16:14:11 +01:00 
			
		
		
		
	Refactored StringBuilder into StringStorage
This commit is contained in:
		| @@ -77,21 +77,16 @@ class MemoryPool { | ||||
|     StringSlot s; | ||||
|     s.value = _left; | ||||
|     s.size = size_t(_right - _left); | ||||
|     _left = _right; | ||||
|     checkInvariants(); | ||||
|     return s; | ||||
|   } | ||||
|  | ||||
|   void freezeString(StringSlot& s, size_t newSize) { | ||||
|     _left -= (s.size - newSize); | ||||
|     _left = (s.value + newSize); | ||||
|     s.size = newSize; | ||||
|     checkInvariants(); | ||||
|   } | ||||
|  | ||||
|   void reclaimLastString(const char* s) { | ||||
|     _left = const_cast<char*>(s); | ||||
|   } | ||||
|  | ||||
|   void clear() { | ||||
|     _left = _begin; | ||||
|     _right = _end; | ||||
|   | ||||
		Reference in New Issue
	
	Block a user