Jelajahi Sumber

Renamed JsonArray::getLength() into size() to match std::vector

Benoît Blanchon 11 tahun lalu
induk
melakukan
6164328892
1 mengubah file dengan 6 tambahan dan 1 penghapusan
  1. 6 1
      JsonParser/JsonArray.h

+ 6 - 1
JsonParser/JsonArray.h

@@ -28,12 +28,17 @@ namespace ArduinoJson
                 return JsonObjectBase::success() && tokens->type == JSMN_ARRAY;
                 return JsonObjectBase::success() && tokens->type == JSMN_ARRAY;
             }
             }
 
 
-            int getLength()
+            int size()
             {
             {
                 return success() ? tokens[0].size : 0;
                 return success() ? tokens[0].size : 0;
             }
             }
 
 
             JsonValue operator[](int index);
             JsonValue operator[](int index);
+
+            DEPRECATED int getLength()
+            {
+                return size();
+            }
                       
                       
             DEPRECATED JsonArray getArray(int index)
             DEPRECATED JsonArray getArray(int index)
             {
             {