mirror of
				https://github.com/eledio-devices/thirdparty-ArduinoJson.git
				synced 2025-10-31 08:42:39 +01:00 
			
		
		
		
	Remove ArrayIterator::internal() and ObjectIterator::internal()
				
					
				
			This commit is contained in:
		| @@ -12,7 +12,8 @@ HEAD | ||||
| * Remove undocumented `ElementProxy` and `MemberProxy` classes | ||||
| * Rename `addElement()` to `add()` | ||||
| * Remove `getElement()`, `getOrAddElement()`, `getMember()`, and `getOrAddMember()` | ||||
| * Remove `JsonDocument::data()` and `JsonDocument::memoryPool()` | ||||
| * Remove undocumented `JsonDocument::data()` and `JsonDocument::memoryPool()` | ||||
| * Remove undocumented `JsonArrayIterator::internal()` and `JsonObjectIterator::internal()` | ||||
|  | ||||
| > ### BREAKING CHANGES | ||||
| > | ||||
|   | ||||
| @@ -26,6 +26,8 @@ class VariantPtr { | ||||
| }; | ||||
|  | ||||
| class ArrayIterator { | ||||
|   friend class ArrayRef; | ||||
|  | ||||
|  public: | ||||
|   ArrayIterator() : _slot(0) {} | ||||
|   explicit ArrayIterator(MemoryPool* pool, VariantSlot* slot) | ||||
| @@ -56,10 +58,6 @@ class ArrayIterator { | ||||
|     return *this; | ||||
|   } | ||||
|  | ||||
|   VariantSlot* internal() { | ||||
|     return _slot; | ||||
|   } | ||||
|  | ||||
|  private: | ||||
|   MemoryPool* _pool; | ||||
|   VariantSlot* _slot; | ||||
| @@ -82,6 +80,8 @@ class VariantConstPtr { | ||||
| }; | ||||
|  | ||||
| class ArrayConstRefIterator { | ||||
|   friend class ArrayRef; | ||||
|  | ||||
|  public: | ||||
|   ArrayConstRefIterator() : _slot(0) {} | ||||
|   explicit ArrayConstRefIterator(const VariantSlot* slot) : _slot(slot) {} | ||||
| @@ -111,10 +111,6 @@ class ArrayConstRefIterator { | ||||
|     return *this; | ||||
|   } | ||||
|  | ||||
|   const VariantSlot* internal() { | ||||
|     return _slot; | ||||
|   } | ||||
|  | ||||
|  private: | ||||
|   const VariantSlot* _slot; | ||||
| }; | ||||
|   | ||||
| @@ -159,7 +159,7 @@ class ArrayRef : public ArrayRefBase<CollectionData>, | ||||
|   FORCE_INLINE void remove(iterator it) const { | ||||
|     if (!_data) | ||||
|       return; | ||||
|     _data->removeSlot(it.internal()); | ||||
|     _data->removeSlot(it._slot); | ||||
|   } | ||||
|  | ||||
|   // Removes element at specified index. | ||||
|   | ||||
| @@ -26,6 +26,8 @@ class PairPtr { | ||||
| }; | ||||
|  | ||||
| class ObjectIterator { | ||||
|   friend class ObjectRef; | ||||
|  | ||||
|  public: | ||||
|   ObjectIterator() : _slot(0) {} | ||||
|  | ||||
| @@ -57,10 +59,6 @@ class ObjectIterator { | ||||
|     return *this; | ||||
|   } | ||||
|  | ||||
|   VariantSlot* internal() { | ||||
|     return _slot; | ||||
|   } | ||||
|  | ||||
|  private: | ||||
|   MemoryPool* _pool; | ||||
|   VariantSlot* _slot; | ||||
| @@ -83,6 +81,8 @@ class PairConstPtr { | ||||
| }; | ||||
|  | ||||
| class ObjectConstIterator { | ||||
|   friend class ObjectRef; | ||||
|  | ||||
|  public: | ||||
|   ObjectConstIterator() : _slot(0) {} | ||||
|  | ||||
| @@ -113,10 +113,6 @@ class ObjectConstIterator { | ||||
|     return *this; | ||||
|   } | ||||
|  | ||||
|   const VariantSlot* internal() { | ||||
|     return _slot; | ||||
|   } | ||||
|  | ||||
|  private: | ||||
|   const VariantSlot* _slot; | ||||
| }; | ||||
|   | ||||
| @@ -176,7 +176,7 @@ class ObjectRef : public ObjectRefBase<CollectionData>, | ||||
|   FORCE_INLINE void remove(iterator it) const { | ||||
|     if (!_data) | ||||
|       return; | ||||
|     _data->removeSlot(it.internal()); | ||||
|     _data->removeSlot(it._slot); | ||||
|   } | ||||
|  | ||||
|   // remove(const std::string&) const | ||||
|   | ||||
		Reference in New Issue
	
	Block a user