Ticket #4146: boost-property_tree_fix2.diff

File boost-property_tree_fix2.diff, 1.3 KB (added by Jan-Hein Bührman <buhrman@…>, 13 years ago)
  • boost/property_tree/detail/xml_parser_read_rapidxml.hpp

     
    103103
    104104        try {
    105105            // Parse using appropriate flags
    106             const int f_tws = parse_normalize_whitespace
    107                             | parse_trim_whitespace;
     106            const int f_tws = (parse_normalize_whitespace
     107                               | parse_trim_whitespace);
    108108            const int f_c = parse_comment_nodes;
     109            const int f_tws_c = (parse_normalize_whitespace
     110                                 | parse_trim_whitespace
     111                                 | parse_comment_nodes);
    109112            xml_document<Ch> doc;
    110113            if (flags & no_comments) {
    111114                if (flags & trim_whitespace)
     
    114117                    doc.BOOST_NESTED_TEMPLATE parse<0>(&v.front());
    115118            } else {
    116119                if (flags & trim_whitespace)
    117                     doc.BOOST_NESTED_TEMPLATE parse<f_tws | f_c>(&v.front());
     120                    doc.BOOST_NESTED_TEMPLATE parse<f_tws_c>(&v.front());
    118121                else
    119122                    doc.BOOST_NESTED_TEMPLATE parse<f_c>(&v.front());
    120123            }