Fixed formatting

This commit is contained in:
Bartek Kryza
2023-05-28 22:20:40 +02:00
parent 8e801fe31d
commit f273f6b2f7
2 changed files with 13 additions and 11 deletions

View File

@@ -1689,8 +1689,8 @@ void translation_unit_visitor::ensure_lambda_type_is_relative(
std::string &parameter_type) const
{
#ifdef _MSC_VER
auto root_name = fmt::format(
"{}", std::filesystem::current_path().root_name().string());
auto root_name =
fmt::format("{}", std::filesystem::current_path().root_name().string());
#else
auto root_name = std::string{"/"};
#endif
@@ -1706,10 +1706,9 @@ void translation_unit_visitor::ensure_lambda_type_is_relative(
#endif
auto absolute_lambda_path_end =
parameter_type.find(':', lambda_begin + lambda_prefix_size);
auto absolute_lambda_path =
parameter_type.substr(lambda_begin + lambda_prefix_size - 1,
absolute_lambda_path_end -
(lambda_begin + lambda_prefix_size - 1));
auto absolute_lambda_path = parameter_type.substr(
lambda_begin + lambda_prefix_size - 1,
absolute_lambda_path_end - (lambda_begin + lambda_prefix_size - 1));
auto relative_lambda_path = util::path_to_url(
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());
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();
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());
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();
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());
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();
diagram().add(p, std::move(c));

View File

@@ -748,14 +748,14 @@ bool parse_source_location(const std::string &location_str, std::string &file,
try {
line = std::stoi(tokens.at(1));
}
catch(std::invalid_argument &e) {
catch (std::invalid_argument &e) {
line = 0;
}
try {
column = std::stoi(tokens.at(2));
}
catch(std::invalid_argument &e) {
catch (std::invalid_argument &e) {
column = 0;
}