|
|
|
@ -1193,8 +1193,9 @@ void Source::View::setup_format_style(bool is_generic_view) { |
|
|
|
try { |
|
|
|
try { |
|
|
|
boost::property_tree::ptree pt; |
|
|
|
boost::property_tree::ptree pt; |
|
|
|
boost::property_tree::xml_parser::read_xml(stdout_stream, pt); |
|
|
|
boost::property_tree::xml_parser::read_xml(stdout_stream, pt); |
|
|
|
auto replacements_pt = pt.get_child("replacements", boost::property_tree::ptree()); |
|
|
|
for(auto it_root = pt.begin(); it_root != pt.end(); ++it_root) { |
|
|
|
for(auto it = replacements_pt.rbegin(); it != replacements_pt.rend(); ++it) { |
|
|
|
if(it_root->first == "replacements") { |
|
|
|
|
|
|
|
for(auto it = it_root->second.rbegin(); it != it_root->second.rend(); ++it) { |
|
|
|
if(it->first == "replacement") { |
|
|
|
if(it->first == "replacement") { |
|
|
|
auto offset = it->second.get<size_t>("<xmlattr>.offset"); |
|
|
|
auto offset = it->second.get<size_t>("<xmlattr>.offset"); |
|
|
|
auto length = it->second.get<size_t>("<xmlattr>.length"); |
|
|
|
auto length = it->second.get<size_t>("<xmlattr>.length"); |
|
|
|
@ -1246,6 +1247,9 @@ void Source::View::setup_format_style(bool is_generic_view) { |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
break; |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
catch(const std::exception &e) { |
|
|
|
catch(const std::exception &e) { |
|
|
|
Terminal::get().print(std::string("\e[31mError\e[m: error parsing clang-format output: ") + e.what() + '\n', true); |
|
|
|
Terminal::get().print(std::string("\e[31mError\e[m: error parsing clang-format output: ") + e.what() + '\n', true); |
|
|
|
|