File tree Expand file tree Collapse file tree 1 file changed +4
-3
lines changed
Expand file tree Collapse file tree 1 file changed +4
-3
lines changed Original file line number Diff line number Diff line change @@ -197,7 +197,7 @@ struct ResponseHandler
197197
198198 bool Key (const Ch* str, rapidjson::SizeType /* length*/ , bool /* copy*/ )
199199 {
200- _key = str;
200+ _keyStack. push ( str) ;
201201 return true ;
202202 }
203203
@@ -225,7 +225,8 @@ struct ResponseHandler
225225 switch (_responseStack.top ().type ())
226226 {
227227 case Type::Map:
228- _responseStack.top ().emplace_back (std::move (_key), std::move (value));
228+ _responseStack.top ().emplace_back (std::move (_keyStack.top ()), std::move (value));
229+ _keyStack.pop ();
229230 break ;
230231
231232 case Type::List:
@@ -238,7 +239,7 @@ struct ResponseHandler
238239 }
239240 }
240241
241- std::string _key ;
242+ std::stack<std:: string> _keyStack ;
242243 std::stack<Value> _responseStack;
243244};
244245
You can’t perform that action at this time.
0 commit comments