forked from bblanchon/ArduinoJson
Renamed JsonObjectBase::getNestedTokenCounts() into getNestedTokenCount()
This commit is contained in:
@ -18,7 +18,7 @@ jsmntok_t* JsonArray::getToken(int index)
|
||||
for (int i = 0; i < index; i++)
|
||||
{
|
||||
// move forward: current + nested tokens
|
||||
currentToken += 1 + getNestedTokenCounts(currentToken);
|
||||
currentToken += 1 + getNestedTokenCount(currentToken);
|
||||
}
|
||||
|
||||
return &tokens[currentToken];
|
||||
|
@ -31,7 +31,7 @@ jsmntok_t* JsonHashTable::getToken(char* name)
|
||||
}
|
||||
|
||||
// move forward: key + value + nested tokens
|
||||
currentToken += 2 + getNestedTokenCounts(currentToken + 1);
|
||||
currentToken += 2 + getNestedTokenCount(currentToken + 1);
|
||||
}
|
||||
|
||||
// nothing found, return NULL
|
||||
|
@ -6,13 +6,13 @@
|
||||
|
||||
#include "JsonObjectBase.h"
|
||||
|
||||
int JsonObjectBase::getNestedTokenCounts(int tokenIndex)
|
||||
int JsonObjectBase::getNestedTokenCount(int tokenIndex)
|
||||
{
|
||||
int count = 0;
|
||||
|
||||
for (int i = 0; i < tokens[tokenIndex].size; i++)
|
||||
{
|
||||
count += 1 + getNestedTokenCounts(tokenIndex + 1 + i);
|
||||
count += 1 + getNestedTokenCount(tokenIndex + 1 + i);
|
||||
}
|
||||
|
||||
return count;
|
||||
|
@ -32,7 +32,7 @@ protected:
|
||||
this->tokens = tokens;
|
||||
}
|
||||
|
||||
int getNestedTokenCounts(int tokenIndex);
|
||||
int getNestedTokenCount(int tokenIndex);
|
||||
|
||||
char* json;
|
||||
jsmntok_t* tokens;
|
||||
|
Reference in New Issue
Block a user