Fix clang-tidy modernize-pass-by-value findings

This commit is contained in:
Tim Wojtulewicz 2025-05-15 09:25:39 -07:00
parent 46e67a749a
commit 5930d2f944
22 changed files with 37 additions and 40 deletions

View file

@ -11,9 +11,8 @@ namespace zeek::plugin {
Tag::type_t Component::type_counter(0);
Component::Component(component::Type arg_type, const std::string& arg_name, Tag::subtype_t tag_subtype,
EnumTypePtr etype)
: type(arg_type), name(arg_name), tag(etype, 1, 0), etype(std::move(etype)), tag_subtype(tag_subtype) {
Component::Component(component::Type arg_type, std::string arg_name, Tag::subtype_t tag_subtype, EnumTypePtr etype)
: type(arg_type), name(std::move(arg_name)), tag(etype, 1, 0), etype(std::move(etype)), tag_subtype(tag_subtype) {
canon_name = util::canonify_name(name);
canon_name_val = make_intrusive<StringVal>(canon_name);
}

View file

@ -66,8 +66,7 @@ public:
* @param etype An enum type that describes the type for the tag in
* script-land.
*/
Component(component::Type type, const std::string& name, Tag::subtype_t tag_subtype = 0,
EnumTypePtr etype = nullptr);
Component(component::Type type, std::string name, Tag::subtype_t tag_subtype = 0, EnumTypePtr etype = nullptr);
/**
* Destructor.