Skip to content

Commit

Permalink
Remove unnecessary copy
Browse files Browse the repository at this point in the history
  • Loading branch information
mavam committed Nov 20, 2020
1 parent 0c6bc01 commit a11f434
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions libvast/src/format/pcap.cpp
Expand Up @@ -416,9 +416,7 @@ caf::error reader::read_impl(size_t max_events, size_t max_slice_size,
reader::flow_state& reader::state(const flow& x) {
auto i = flows_.find(x);
if (i == flows_.end()) {
// Why do we construct a separate flow here as opposed to using x? --MV
auto cf = flow{x.src_addr, x.dst_addr, x.src_port, x.dst_port};
auto id = community_id::compute<policy::base64>(cf);
auto id = community_id::compute<policy::base64>(x);
i = flows_.emplace(x, flow_state{0, 0, std::move(id)}).first;
}
return i->second;
Expand Down

0 comments on commit a11f434

Please sign in to comment.