Renamed JsonObjectBase::getNestedTokenCounts() into getNestedTokenCount()

This commit is contained in:
Benoit Blanchon
2014-01-11 15:23:08 +01:00
parent 43717bff1e
commit da37162a94
4 changed files with 5 additions and 5 deletions

View File

@ -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];

View File

@ -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

View File

@ -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;

View File

@ -32,7 +32,7 @@ protected:
this->tokens = tokens;
}
int getNestedTokenCounts(int tokenIndex);
int getNestedTokenCount(int tokenIndex);
char* json;
jsmntok_t* tokens;