File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -637,6 +637,13 @@ namespace Json {
637637# ifndef JSONCPP_DOC_EXCLUDE_IMPLEMENTATION
638638 struct IteratorState
639639 {
640+ IteratorState ()
641+ : map_(0 )
642+ , link_(0 )
643+ , itemIndex_(0 )
644+ , bucketIndex_(0 )
645+ {
646+ }
640647 ValueInternalMap *map_;
641648 ValueInternalLink *link_;
642649 BucketIndex itemIndex_;
@@ -729,6 +736,12 @@ namespace Json {
729736# ifndef JSONCPP_DOC_EXCLUDE_IMPLEMENTATION
730737 struct IteratorState // Must be a POD
731738 {
739+ IteratorState ()
740+ : array_(0 )
741+ , currentPageIndex_(0 )
742+ , currentItemIndex_(0 )
743+ {
744+ }
732745 ValueInternalArray *array_;
733746 Value **currentPageIndex_;
734747 unsigned int currentItemIndex_;
Original file line number Diff line number Diff line change @@ -14,11 +14,15 @@ ValueIteratorBase::ValueIteratorBase()
1414#ifndef JSON_VALUE_USE_INTERNAL_MAP
1515 : current_()
1616 , isNull_( true )
17+ {
18+ }
1719#else
18- # error fix me // Need to handle uninitialized iterator comparison for experimental maps
19- # endif
20+ : isArray_( true )
21+ , isNull_( true )
2022{
23+ iterator_.array_ = ValueInternalArray::IteratorState ();
2124}
25+ #endif
2226
2327
2428#ifndef JSON_VALUE_USE_INTERNAL_MAP
You can’t perform that action at this time.
0 commit comments