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

@@ -19,7 +19,7 @@
namespace clanguml::common::generators::plantuml {
std::string to_plantuml(relationship_t r, std::string style)
std::string to_plantuml(relationship_t r, const std::string &style)
{
switch (r) {
case relationship_t::kOwnership:

View File

@@ -37,7 +37,7 @@ using clanguml::common::model::element;
using clanguml::common::model::message_t;
using clanguml::common::model::relationship_t;
std::string to_plantuml(relationship_t r, std::string style);
std::string to_plantuml(relationship_t r, const std::string &style);
std::string to_plantuml(access_t scope);
std::string to_plantuml(message_t r);

View File

@@ -354,7 +354,7 @@ tvl::value_t context_filter::match(const diagram &d, const element &e) const
}
paths_filter::paths_filter(filter_t type, const std::filesystem::path &root,
std::vector<std::filesystem::path> p)
const std::vector<std::filesystem::path> &p)
: filter_visitor{type}
, root_{root}
{
@@ -420,7 +420,7 @@ void diagram_filter::add_exclusive_filter(std::unique_ptr<filter_visitor> fv)
}
bool diagram_filter::should_include(
namespace_ ns, const std::string &name) const
const namespace_ &ns, const std::string &name) const
{
if (should_include(ns)) {
element e{namespace_{}};

View File

@@ -314,7 +314,7 @@ private:
struct paths_filter : public filter_visitor {
paths_filter(filter_t type, const std::filesystem::path &root,
std::vector<std::filesystem::path> p);
const std::vector<std::filesystem::path> &p);
virtual ~paths_filter() = default;
@@ -334,7 +334,7 @@ public:
void add_exclusive_filter(std::unique_ptr<filter_visitor> fv);
bool should_include(namespace_ ns, const std::string &name) const;
bool should_include(const namespace_ &ns, const std::string &name) const;
template <typename T> bool should_include(const T &e) const
{