mirror of
				https://github.com/eledio-devices/thirdparty-ArduinoJson.git
				synced 2025-10-31 16:14:11 +01:00 
			
		
		
		
	Refactored getNestedTokenCount()
This commit is contained in:
		| @@ -10,12 +10,14 @@ | |||||||
|  |  | ||||||
| int JsonObjectBase::getNestedTokenCount(jsmntok_t* token) | int JsonObjectBase::getNestedTokenCount(jsmntok_t* token) | ||||||
| { | { | ||||||
| 	int count = 0; | 	int end = token->end; | ||||||
| 	jsmntok_t* nextSibling = token + 1; | 	int count = 0;	 | ||||||
|  |  | ||||||
| 	while (nextSibling->start < token->end) | 	token++; | ||||||
|  |  | ||||||
|  | 	while (token->start < end) | ||||||
| 	{ | 	{ | ||||||
| 		nextSibling++; | 		token++; | ||||||
| 		count++; | 		count++; | ||||||
| 	} | 	} | ||||||
|  |  | ||||||
|   | |||||||
		Reference in New Issue
	
	Block a user