From d19486d0392d039ef2397f7178b388eeab1ea44c Mon Sep 17 00:00:00 2001 From: Tim Wojtulewicz Date: Mon, 9 Jun 2025 19:34:09 -0700 Subject: [PATCH] Fix clang-tidy modernize-pass-by-value warnings in headers --- src/file_analysis/AnalyzerSet.h | 4 ++-- src/zeekygen/SpicyModuleInfo.h | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/src/file_analysis/AnalyzerSet.h b/src/file_analysis/AnalyzerSet.h index c446d8f5ed..53827a595f 100644 --- a/src/file_analysis/AnalyzerSet.h +++ b/src/file_analysis/AnalyzerSet.h @@ -187,8 +187,8 @@ private: * @param arg_a an analyzer instance to add to an analyzer set. * @param arg_key hash key representing the analyzer's \c AnalyzerArgs. */ - RemoveMod(const zeek::Tag& arg_tag, std::unique_ptr arg_key) - : Modification(), tag(arg_tag), key(std::move(arg_key)) {} + RemoveMod(zeek::Tag arg_tag, std::unique_ptr arg_key) + : Modification(), tag(std::move(arg_tag)), key(std::move(arg_key)) {} ~RemoveMod() override {} bool Perform(AnalyzerSet* set) override; void Abort() override {} diff --git a/src/zeekygen/SpicyModuleInfo.h b/src/zeekygen/SpicyModuleInfo.h index 8f71daf6a6..5db9d638dc 100644 --- a/src/zeekygen/SpicyModuleInfo.h +++ b/src/zeekygen/SpicyModuleInfo.h @@ -21,8 +21,8 @@ public: * @param name name of the Spicy EVT module. * @param description text describing the module further */ - explicit SpicyModuleInfo(const std::string& name, const std::string& description) - : name(name), description(description) {} + explicit SpicyModuleInfo(std::string name, std::string description) + : name(std::move(name)), description(std::move(description)) {} /** @return textual description of the module */ const auto& Description() const { return description; }