Fixed formatting
This commit is contained in:
@@ -347,7 +347,6 @@ void diagram_filter::init_filters(const config::diagram &c)
|
||||
element_filters.emplace_back(std::make_unique<context_filter>(
|
||||
filter_t::kInclusive, c.include().context));
|
||||
|
||||
|
||||
inclusive_.emplace_back(std::make_unique<anyof_filter>(
|
||||
filter_t::kInclusive, std::move(element_filters)));
|
||||
}
|
||||
|
||||
@@ -135,8 +135,8 @@ struct paths_filter : public filter_visitor {
|
||||
paths_filter(filter_t type, const std::filesystem::path &root,
|
||||
std::vector<std::filesystem::path> p);
|
||||
|
||||
tvl::value_t match(const diagram &d,
|
||||
const common::model::source_file &r) const override;
|
||||
tvl::value_t match(
|
||||
const diagram &d, const common::model::source_file &r) const override;
|
||||
|
||||
private:
|
||||
std::vector<std::filesystem::path> paths_;
|
||||
@@ -162,9 +162,7 @@ public:
|
||||
return false;
|
||||
|
||||
auto inc = tvl::all_of(inclusive_.begin(), inclusive_.end(),
|
||||
[this, &e](const auto &in) {
|
||||
return in->match(diagram_, e);
|
||||
});
|
||||
[this, &e](const auto &in) { return in->match(diagram_, e); });
|
||||
|
||||
if (tvl::is_undefined(inc) || tvl::is_true(inc))
|
||||
return true;
|
||||
|
||||
@@ -52,8 +52,7 @@ public:
|
||||
}
|
||||
|
||||
template <typename V = T>
|
||||
void add_element(
|
||||
const Path &path, std::unique_ptr<V> p)
|
||||
void add_element(const Path &path, std::unique_ptr<V> p)
|
||||
{
|
||||
assert(p);
|
||||
|
||||
|
||||
@@ -45,8 +45,8 @@ void diagram::add_file(std::unique_ptr<common::model::source_file> &&f)
|
||||
add_element(p, std::move(f));
|
||||
}
|
||||
|
||||
type_safe::optional_ref<const common::model::source_file>
|
||||
diagram::get_file(const std::string &name) const
|
||||
type_safe::optional_ref<const common::model::source_file> diagram::get_file(
|
||||
const std::string &name) const
|
||||
{
|
||||
for (const auto &p : files_) {
|
||||
if (p.get().full_name(false) == name) {
|
||||
|
||||
@@ -145,6 +145,5 @@ void translation_unit_visitor::process_file(const std::string &file,
|
||||
ctx.diagram().add_file(std::move(f));
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
@@ -17,17 +17,17 @@
|
||||
*/
|
||||
#pragma once
|
||||
|
||||
#include "common/model/enums.h"
|
||||
#include "common/model/package.h"
|
||||
#include "config/config.h"
|
||||
#include "cx/cursor.h"
|
||||
#include "include_diagram/model/diagram.h"
|
||||
#include "include_diagram/visitor/translation_unit_context.h"
|
||||
#include "common/model/enums.h"
|
||||
#include "common/model/package.h"
|
||||
|
||||
#include <clang-c/CXCompilationDatabase.h>
|
||||
#include <clang-c/Index.h>
|
||||
#include <cppast/visitor.hpp>
|
||||
#include <cppast/cpp_preprocessor.hpp>
|
||||
#include <cppast/visitor.hpp>
|
||||
#include <type_safe/reference.hpp>
|
||||
|
||||
#include <functional>
|
||||
|
||||
@@ -202,7 +202,7 @@ template <>
|
||||
bool starts_with(
|
||||
const std::filesystem::path &path, const std::filesystem::path &prefix)
|
||||
{
|
||||
if(path == prefix)
|
||||
if (path == prefix)
|
||||
return true;
|
||||
|
||||
const int path_length = std::distance(std::begin(path), std::end(path));
|
||||
|
||||
Reference in New Issue
Block a user