diff --git a/JsonArray.cpp b/JsonArray.cpp index 388daa18..0a508485 100644 --- a/JsonArray.cpp +++ b/JsonArray.cpp @@ -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]; diff --git a/JsonHashTable.cpp b/JsonHashTable.cpp index 494d5526..5de2bf2e 100644 --- a/JsonHashTable.cpp +++ b/JsonHashTable.cpp @@ -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 diff --git a/JsonObjectBase.cpp b/JsonObjectBase.cpp index 956ea703..dd51c0af 100644 --- a/JsonObjectBase.cpp +++ b/JsonObjectBase.cpp @@ -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; diff --git a/JsonObjectBase.h b/JsonObjectBase.h index 9553d826..d576b8e1 100644 --- a/JsonObjectBase.h +++ b/JsonObjectBase.h @@ -32,7 +32,7 @@ protected: this->tokens = tokens; } - int getNestedTokenCounts(int tokenIndex); + int getNestedTokenCount(int tokenIndex); char* json; jsmntok_t* tokens;