Просмотр исходного кода

Renamed JsonObjectBase::getNestedTokenCounts() into getNestedTokenCount()

Benoit Blanchon 12 лет назад
Родитель
Сommit
da37162a94
4 измененных файлов с 5 добавлено и 5 удалено
  1. 1 1
      JsonArray.cpp
  2. 1 1
      JsonHashTable.cpp
  3. 2 2
      JsonObjectBase.cpp
  4. 1 1
      JsonObjectBase.h

+ 1 - 1
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];

+ 1 - 1
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

+ 2 - 2
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;

+ 1 - 1
JsonObjectBase.h

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