@@ -23,16 +23,14 @@ inline CollectionImpl::iterator CollectionImpl::createIterator() const {
2323 if (!data_)
2424 return iterator ();
2525 auto coll = getCollectionData ();
26- return iterator (resources_-> getVariant (coll->head ), coll->head );
26+ return iterator (getVariant (coll->head ), coll->head );
2727}
2828
2929inline void CollectionImpl::appendOne (Slot<VariantData> slot) {
30- ARDUINOJSON_ASSERT (resources_ != nullptr );
31-
3230 auto coll = getCollectionData ();
3331
3432 if (coll->tail != NULL_SLOT) {
35- auto tail = resources_-> getVariant (coll->tail );
33+ auto tail = getVariant (coll->tail );
3634 tail->next = slot.id ();
3735 coll->tail = slot.id ();
3836 } else {
@@ -43,14 +41,12 @@ inline void CollectionImpl::appendOne(Slot<VariantData> slot) {
4341
4442inline void CollectionImpl::appendPair (Slot<VariantData> key,
4543 Slot<VariantData> value) {
46- ARDUINOJSON_ASSERT (resources_ != nullptr );
47-
4844 auto coll = getCollectionData ();
4945
5046 key->next = value.id ();
5147
5248 if (coll->tail != NULL_SLOT) {
53- auto tail = resources_-> getVariant (coll->tail );
49+ auto tail = getVariant (coll->tail );
5450 tail->next = key.id ();
5551 coll->tail = value.id ();
5652 } else {
@@ -68,9 +64,9 @@ inline void CollectionImpl::clear() {
6864 auto next = coll->head ;
6965 while (next != NULL_SLOT) {
7066 auto currId = next;
71- auto slot = resources_-> getVariant (next);
67+ auto slot = getVariant (next);
7268 next = slot->next ;
73- resources_-> freeVariant ({slot, currId});
69+ freeVariant ({slot, currId});
7470 }
7571
7672 coll->head = NULL_SLOT;
@@ -83,7 +79,7 @@ inline Slot<VariantData> CollectionImpl::getPreviousSlot(
8379 auto prev = Slot<VariantData>();
8480 auto currentId = coll->head ;
8581 while (currentId != NULL_SLOT) {
86- auto currentSlot = resources_-> getVariant (currentId);
82+ auto currentSlot = getVariant (currentId);
8783 if (currentSlot == target)
8884 break ;
8985 prev = Slot<VariantData>(currentSlot, currentId);
@@ -105,7 +101,7 @@ inline void CollectionImpl::removeOne(iterator it) {
105101 coll->head = next;
106102 if (next == NULL_SLOT)
107103 coll->tail = prev.id ();
108- resources_-> freeVariant ({it.slot_ , it.currentId_ });
104+ freeVariant ({it.slot_ , it.currentId_ });
109105}
110106
111107inline void CollectionImpl::removePair (ObjectImpl::iterator it) {
@@ -115,11 +111,11 @@ inline void CollectionImpl::removePair(ObjectImpl::iterator it) {
115111 auto keySlot = it.slot_ ;
116112
117113 auto valueId = keySlot->next ;
118- auto valueSlot = resources_-> getVariant (valueId);
114+ auto valueSlot = getVariant (valueId);
119115
120116 // remove value slot
121117 keySlot->next = valueSlot->next ;
122- resources_-> freeVariant ({valueSlot, valueId});
118+ freeVariant ({valueSlot, valueId});
123119
124120 // remove key slot
125121 removeOne (it);
0 commit comments