mirror of
https://github.com/zeek/zeek.git
synced 2025-10-04 07:38:19 +00:00
Add some uses of std::move in constructors and simple functions for pass-by-value arguments
This commit is contained in:
parent
1e33467844
commit
ef5b169acd
9 changed files with 15 additions and 14 deletions
|
@ -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();
|
||||
|
|
|
@ -263,7 +263,9 @@ void IPBasedAnalyzer::DumpPortDebug() {
|
|||
|
||||
TableValPtr IPBasedAnalyzer::ignore_checksums_nets_table = nullptr;
|
||||
|
||||
void IPBasedAnalyzer::SetIgnoreChecksumsNets(TableValPtr t) { IPBasedAnalyzer::ignore_checksums_nets_table = t; }
|
||||
void IPBasedAnalyzer::SetIgnoreChecksumsNets(TableValPtr t) {
|
||||
IPBasedAnalyzer::ignore_checksums_nets_table = std::move(t);
|
||||
}
|
||||
|
||||
TableValPtr IPBasedAnalyzer::GetIgnoreChecksumsNets() {
|
||||
if ( ! IPBasedAnalyzer::ignore_checksums_nets_table )
|
||||
|
|
|
@ -185,7 +185,7 @@ namespace detail {
|
|||
|
||||
IPTunnelTimer::IPTunnelTimer(double t, IPTunnelAnalyzer::IPPair p, IPTunnelAnalyzer* analyzer)
|
||||
: Timer(t + BifConst::Tunnel::ip_tunnel_timeout, zeek::detail::TIMER_IP_TUNNEL_INACTIVITY),
|
||||
tunnel_idx(p),
|
||||
tunnel_idx(std::move(p)),
|
||||
analyzer(analyzer) {}
|
||||
|
||||
void IPTunnelTimer::Dispatch(double t, bool is_expire) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue