mirror of
				https://github.com/eledio-devices/thirdparty-ArduinoJson.git
				synced 2025-10-31 16:14:11 +01:00 
			
		
		
		
	getElement() (6790,5602)
This commit is contained in:
		| @@ -277,8 +277,8 @@ class VariantData { | ||||
|     return _content.asCollection.addElement(pool); | ||||
|   } | ||||
|  | ||||
|   VariantData *getElement(size_t index) const {  // P+4 G+0 | ||||
|     const CollectionData *col = resolve()->asArray(); | ||||
|   VariantData *getElement(size_t index) const { | ||||
|     const CollectionData *col = asArray(); | ||||
|     return col ? col->getElement(index) : 0; | ||||
|   } | ||||
|  | ||||
|   | ||||
| @@ -133,7 +133,8 @@ inline VariantRef VariantRef::addElement() const { | ||||
| } | ||||
|  | ||||
| inline VariantRef VariantRef::getElement(size_t index) const { | ||||
|   return VariantRef(_pool, _data != 0 ? _data->getElement(index) : 0); | ||||
|   return VariantRef(_pool, | ||||
|                     _data != 0 ? _data->resolve()->getElement(index) : 0); | ||||
| } | ||||
|  | ||||
| inline VariantRef VariantRef::getOrAddElement(size_t index) const { | ||||
|   | ||||
		Reference in New Issue
	
	Block a user