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> {
59
59
writeInteger (uint32_t (n));
60
60
}
61
61
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 );
68
64
69
65
return bytesWritten ();
70
66
}
@@ -81,12 +77,8 @@ class MsgPackSerializer : public VariantDataVisitor<size_t> {
81
77
writeInteger (uint32_t (n));
82
78
}
83
79
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 );
90
82
91
83
return bytesWritten ();
92
84
}
Original file line number Diff line number Diff line change @@ -250,10 +250,6 @@ class VariantImpl {
250
250
}
251
251
#endif
252
252
253
- SlotId head () const {
254
- return getCollectionData ()->head ;
255
- }
256
-
257
253
iterator createIterator () const ;
258
254
259
255
VariantData* getElement (size_t index) const ;
You can’t perform that action at this time.
0 commit comments