Ticket #4786: boost_1_44_0.property_tree.2.patch
File boost_1_44_0.property_tree.2.patch, 3.3 KB (added by , 12 years ago) |
---|
-
boost/property_tree/detail/info_parser_read.hpp
old new 288 288 else // Key text found 289 289 { 290 290 std::basic_string<Ch> key = read_key(text); 291 last = &stack.top()->push_back(291 last = (Ptree*)&stack.top()->push_back( 292 292 std::make_pair(key, Ptree()))->second; 293 293 state = s_data; 294 294 } … … 322 322 { 323 323 bool need_more_lines; 324 324 std::basic_string<Ch> data = read_data(text, &need_more_lines); 325 if (need_more_lines) 326 { 325 327 last->data() = data; 326 state = need_more_lines ? s_data_cont : s_key; 328 state = s_data_cont; 329 } 330 else 331 { 332 typename translator_between< 333 typename Ptree::data_type, 334 std::basic_string<Ch> >::type tr; 335 last->data() = *(typename Ptree::data_type*) 336 &tr.put_value(data); 337 state = s_key; 338 } 327 339 } 328 340 329 341 … … 339 351 if (*text == Ch('\"')) // Continuation must start with " 340 352 { 341 353 bool need_more_lines; 342 std::basic_string<Ch> data = read_string(text, &need_more_lines); 343 last->put_value(last->template get_value<std::basic_string<Ch> >() + data); 344 state = need_more_lines ? s_data_cont : s_key; 354 std::basic_string<Ch> data = 355 last->template get_value<std::basic_string<Ch> >() + 356 read_string(text, &need_more_lines); 357 358 if (need_more_lines) 359 { 360 last->data() = data; 361 state = s_data_cont; 362 } 363 else 364 { 365 typename translator_between< 366 typename Ptree::data_type, 367 std::basic_string<Ch> >::type tr; 368 last->data() = *(typename Ptree::data_type*) 369 &tr.put_value(data); 370 state = s_key; 371 } 345 372 } 346 373 else 347 374 BOOST_PROPERTY_TREE_THROW(info_parser_error("expected \" after \\ in previous line", "", 0));