Applied performance-unnecessary-value-param clang-tidy fixes

This commit is contained in:
Bartek Kryza
2022-12-20 23:15:59 +01:00
parent 6b883c4562
commit 177c68158a
13 changed files with 23 additions and 16 deletions

View File

@@ -68,7 +68,7 @@ void class_::add_parent(class_parent &&parent)
bases_.emplace_back(std::move(parent));
}
void class_::add_template(template_parameter tmplt)
void class_::add_template(template_parameter &&tmplt)
{
templates_.emplace_back(std::move(tmplt));
}

View File

@@ -56,7 +56,7 @@ public:
void add_member(class_member &&member);
void add_method(class_method &&method);
void add_parent(class_parent &&parent);
void add_template(template_parameter tmplt);
void add_template(template_parameter &&tmplt);
const std::vector<class_member> &members() const;
const std::vector<class_method> &methods() const;

View File

@@ -180,7 +180,8 @@ bool template_parameter::find_nested_relationships(
std::vector<std::pair<int64_t, common::model::relationship_t>>
&nested_relationships,
common::model::relationship_t hint,
std::function<bool(const std::string &full_name)> should_include) const
const std::function<bool(const std::string &full_name)> &should_include)
const
{
bool added_aggregation_relationship{false};

View File

@@ -97,7 +97,8 @@ public:
std::vector<std::pair<int64_t, common::model::relationship_t>>
&nested_relationships,
common::model::relationship_t hint,
std::function<bool(const std::string &full_name)> should_include) const;
const std::function<bool(const std::string &full_name)> &should_include)
const;
private:
/// Represents the type of non-type template parameters