File tree Expand file tree Collapse file tree 2 files changed +4
-16
lines changed Expand file tree Collapse file tree 2 files changed +4
-16
lines changed Original file line number Diff line number Diff line change @@ -59,12 +59,8 @@ class MsgPackSerializer : public VariantDataVisitor<size_t> {
5959 writeInteger (uint32_t (n));
6060 }
6161
62- auto slotId = array.head ();
63- while (slotId != NULL_SLOT) {
64- auto slot = resources_->getVariant (slotId);
65- VariantImpl (slot, resources_).accept (*this );
66- slotId = slot->next ;
67- }
62+ for (auto it = array.createIterator (); !it.done (); it.move ())
63+ it->accept (*this );
6864
6965 return bytesWritten ();
7066 }
@@ -81,12 +77,8 @@ class MsgPackSerializer : public VariantDataVisitor<size_t> {
8177 writeInteger (uint32_t (n));
8278 }
8379
84- auto slotId = object.head ();
85- while (slotId != NULL_SLOT) {
86- auto slot = resources_->getVariant (slotId);
87- VariantImpl (slot, resources_).accept (*this );
88- slotId = slot->next ;
89- }
80+ for (auto it = object.createIterator (); !it.done (); it.move ())
81+ it->accept (*this );
9082
9183 return bytesWritten ();
9284 }
Original file line number Diff line number Diff line change @@ -250,10 +250,6 @@ class VariantImpl {
250250 }
251251#endif
252252
253- SlotId head () const {
254- return getCollectionData ()->head ;
255- }
256-
257253 iterator createIterator () const ;
258254
259255 VariantData* getElement (size_t index) const ;
You can’t perform that action at this time.
0 commit comments