Remove ArrayIterator::internal() and ObjectIterator::internal()

This commit is contained in:
Benoit Blanchon
2022-10-13 09:41:06 +02:00
parent 6e17c3e6f9
commit 92d6bae25c
5 changed files with 12 additions and 19 deletions

View File

@ -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
>

View File

@ -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;
};

View File

@ -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.

View File

@ -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;
};

View File

@ -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