Add some uses of std::move in constructors and simple functions for pass-by-value arguments

This commit is contained in:
Tim Wojtulewicz 2023-11-27 11:41:48 -07:00
parent 1e33467844
commit ef5b169acd
9 changed files with 15 additions and 14 deletions

View file

@ -9,9 +9,8 @@
using namespace zeek::packet_analysis;
Component::Component(const std::string& name, factory_callback arg_factory, Tag::subtype_t arg_subtype)
: plugin::Component(plugin::component::PACKET_ANALYZER, name, arg_subtype, packet_mgr->GetTagType()) {
factory = arg_factory;
}
: plugin::Component(plugin::component::PACKET_ANALYZER, name, arg_subtype, packet_mgr->GetTagType()),
factory(std::move(arg_factory)) {}
void Component::Initialize() {
InitializeTag();