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