Ticket #8064: ini_parser.patch
File ini_parser.patch, 1.1 KB (added by , 10 years ago) |
---|
-
ini_parser.hpp
old new 91 91 92 92 // If line is non-empty 93 93 line = property_tree::detail::trim(line, stream.getloc()); 94 95 // Ignore comments by removing them 96 typename std::basic_string<Ch>::const_iterator first = line.begin(); 97 typename std::basic_string<Ch>::const_iterator last = line.begin(); 98 while (last != line.end() && *last != semicolon && *last != hash) 99 ++last; 100 line = std::basic_string<Ch>(first, last); 101 std::cout << line << std::endl; 102 94 103 if (!line.empty()) 95 104 { 96 // Comment, section or key? 97 if (line[0] == semicolon || line[0] == hash) 98 { 99 // Ignore comments 100 } 101 else if (line[0] == lbracket) 105 // Does the line contains a key ? 106 if (line[0] == lbracket) 102 107 { 103 108 // If the previous section was empty, drop it again. 104 109 if (section && section->empty())