mirror of
https://github.com/bblanchon/ArduinoJson.git
synced 2025-07-21 22:42:25 +02:00
Refactored getNestedTokenCount()
This commit is contained in:
@ -10,12 +10,14 @@
|
||||
|
||||
int JsonObjectBase::getNestedTokenCount(jsmntok_t* token)
|
||||
{
|
||||
int end = token->end;
|
||||
int count = 0;
|
||||
jsmntok_t* nextSibling = token + 1;
|
||||
|
||||
while (nextSibling->start < token->end)
|
||||
token++;
|
||||
|
||||
while (token->start < end)
|
||||
{
|
||||
nextSibling++;
|
||||
token++;
|
||||
count++;
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user