@@ -29,16 +29,14 @@ inline CollectionImpl::iterator CollectionImpl::createIterator() const {
2929 if (!data_)
3030 return iterator ();
3131 auto coll = getCollectionData ();
32- return iterator (resources_-> getVariant (coll->head ), coll->head );
32+ return iterator (getVariant (coll->head ), coll->head );
3333}
3434
3535inline void CollectionImpl::appendOne (Slot<VariantData> slot) {
36- ARDUINOJSON_ASSERT (resources_ != nullptr );
37-
3836 auto coll = getCollectionData ();
3937
4038 if (coll->tail != NULL_SLOT) {
41- auto tail = resources_-> getVariant (coll->tail );
39+ auto tail = getVariant (coll->tail );
4240 tail->next = slot.id ();
4341 coll->tail = slot.id ();
4442 } else {
@@ -49,14 +47,12 @@ inline void CollectionImpl::appendOne(Slot<VariantData> slot) {
4947
5048inline void CollectionImpl::appendPair (Slot<VariantData> key,
5149 Slot<VariantData> value) {
52- ARDUINOJSON_ASSERT (resources_ != nullptr );
53-
5450 auto coll = getCollectionData ();
5551
5652 key->next = value.id ();
5753
5854 if (coll->tail != NULL_SLOT) {
59- auto tail = resources_-> getVariant (coll->tail );
55+ auto tail = getVariant (coll->tail );
6056 tail->next = key.id ();
6157 coll->tail = value.id ();
6258 } else {
@@ -74,9 +70,9 @@ inline void CollectionImpl::clear() {
7470 auto next = coll->head ;
7571 while (next != NULL_SLOT) {
7672 auto currId = next;
77- auto slot = resources_-> getVariant (next);
73+ auto slot = getVariant (next);
7874 next = slot->next ;
79- resources_-> freeVariant ({slot, currId});
75+ freeVariant ({slot, currId});
8076 }
8177
8278 coll->head = NULL_SLOT;
@@ -89,7 +85,7 @@ inline Slot<VariantData> CollectionImpl::getPreviousSlot(
8985 auto prev = Slot<VariantData>();
9086 auto currentId = coll->head ;
9187 while (currentId != NULL_SLOT) {
92- auto currentSlot = resources_-> getVariant (currentId);
88+ auto currentSlot = getVariant (currentId);
9389 if (currentSlot == target)
9490 break ;
9591 prev = Slot<VariantData>(currentSlot, currentId);
@@ -111,7 +107,7 @@ inline void CollectionImpl::removeOne(iterator it) {
111107 coll->head = next;
112108 if (next == NULL_SLOT)
113109 coll->tail = prev.id ();
114- resources_-> freeVariant ({it.slot_ , it.currentId_ });
110+ freeVariant ({it.slot_ , it.currentId_ });
115111}
116112
117113inline void CollectionImpl::removePair (ObjectImpl::iterator it) {
@@ -121,11 +117,11 @@ inline void CollectionImpl::removePair(ObjectImpl::iterator it) {
121117 auto keySlot = it.slot_ ;
122118
123119 auto valueId = it.nextId_ ;
124- auto valueSlot = resources_-> getVariant (valueId);
120+ auto valueSlot = getVariant (valueId);
125121
126122 // remove value slot
127123 keySlot->next = valueSlot->next ;
128- resources_-> freeVariant ({valueSlot, valueId});
124+ freeVariant ({valueSlot, valueId});
129125
130126 // remove key slot
131127 removeOne (it);
0 commit comments