Fixed formatting
This commit is contained in:
@@ -1689,8 +1689,8 @@ void translation_unit_visitor::ensure_lambda_type_is_relative(
|
|||||||
std::string ¶meter_type) const
|
std::string ¶meter_type) const
|
||||||
{
|
{
|
||||||
#ifdef _MSC_VER
|
#ifdef _MSC_VER
|
||||||
auto root_name = fmt::format(
|
auto root_name =
|
||||||
"{}", std::filesystem::current_path().root_name().string());
|
fmt::format("{}", std::filesystem::current_path().root_name().string());
|
||||||
#else
|
#else
|
||||||
auto root_name = std::string{"/"};
|
auto root_name = std::string{"/"};
|
||||||
#endif
|
#endif
|
||||||
@@ -1706,10 +1706,9 @@ void translation_unit_visitor::ensure_lambda_type_is_relative(
|
|||||||
#endif
|
#endif
|
||||||
auto absolute_lambda_path_end =
|
auto absolute_lambda_path_end =
|
||||||
parameter_type.find(':', lambda_begin + lambda_prefix_size);
|
parameter_type.find(':', lambda_begin + lambda_prefix_size);
|
||||||
auto absolute_lambda_path =
|
auto absolute_lambda_path = parameter_type.substr(
|
||||||
parameter_type.substr(lambda_begin + lambda_prefix_size - 1,
|
lambda_begin + lambda_prefix_size - 1,
|
||||||
absolute_lambda_path_end -
|
absolute_lambda_path_end - (lambda_begin + lambda_prefix_size - 1));
|
||||||
(lambda_begin + lambda_prefix_size - 1));
|
|
||||||
|
|
||||||
auto relative_lambda_path = util::path_to_url(
|
auto relative_lambda_path = util::path_to_url(
|
||||||
config().make_path_relative(absolute_lambda_path).string());
|
config().make_path_relative(absolute_lambda_path).string());
|
||||||
@@ -2102,7 +2101,8 @@ void translation_unit_visitor::add_class(std::unique_ptr<class_> &&c)
|
|||||||
|
|
||||||
const auto file = config().make_path_relative(c->file());
|
const auto file = config().make_path_relative(c->file());
|
||||||
|
|
||||||
common::model::path p{file.string(), common::model::path_type::kFilesystem};
|
common::model::path p{
|
||||||
|
file.string(), common::model::path_type::kFilesystem};
|
||||||
p.pop_back();
|
p.pop_back();
|
||||||
|
|
||||||
diagram().add(p, std::move(c));
|
diagram().add(p, std::move(c));
|
||||||
@@ -2120,7 +2120,8 @@ void translation_unit_visitor::add_enum(std::unique_ptr<enum_> &&e)
|
|||||||
|
|
||||||
const auto file = config().make_path_relative(e->file());
|
const auto file = config().make_path_relative(e->file());
|
||||||
|
|
||||||
common::model::path p{file.string(), common::model::path_type::kFilesystem};
|
common::model::path p{
|
||||||
|
file.string(), common::model::path_type::kFilesystem};
|
||||||
p.pop_back();
|
p.pop_back();
|
||||||
|
|
||||||
diagram().add(p, std::move(e));
|
diagram().add(p, std::move(e));
|
||||||
@@ -2138,7 +2139,8 @@ void translation_unit_visitor::add_concept(std::unique_ptr<concept_> &&c)
|
|||||||
|
|
||||||
const auto file = config().make_path_relative(c->file());
|
const auto file = config().make_path_relative(c->file());
|
||||||
|
|
||||||
common::model::path p{file.string(), common::model::path_type::kFilesystem};
|
common::model::path p{
|
||||||
|
file.string(), common::model::path_type::kFilesystem};
|
||||||
p.pop_back();
|
p.pop_back();
|
||||||
|
|
||||||
diagram().add(p, std::move(c));
|
diagram().add(p, std::move(c));
|
||||||
|
|||||||
@@ -748,14 +748,14 @@ bool parse_source_location(const std::string &location_str, std::string &file,
|
|||||||
try {
|
try {
|
||||||
line = std::stoi(tokens.at(1));
|
line = std::stoi(tokens.at(1));
|
||||||
}
|
}
|
||||||
catch(std::invalid_argument &e) {
|
catch (std::invalid_argument &e) {
|
||||||
line = 0;
|
line = 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
try {
|
try {
|
||||||
column = std::stoi(tokens.at(2));
|
column = std::stoi(tokens.at(2));
|
||||||
}
|
}
|
||||||
catch(std::invalid_argument &e) {
|
catch (std::invalid_argument &e) {
|
||||||
column = 0;
|
column = 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user