mirror of
https://github.com/zeek/zeek.git
synced 2025-10-04 15:48:19 +00:00
iosource/Manager: eliminate two std::string copies
This commit is contained in:
parent
20eb0e15c7
commit
4b8b6ec559
1 changed files with 2 additions and 2 deletions
|
@ -324,8 +324,8 @@ static std::pair<std::string, std::string> split_prefix(std::string path)
|
||||||
PktSrc* Manager::OpenPktSrc(const std::string& path, bool is_live)
|
PktSrc* Manager::OpenPktSrc(const std::string& path, bool is_live)
|
||||||
{
|
{
|
||||||
std::pair<std::string, std::string> t = split_prefix(path);
|
std::pair<std::string, std::string> t = split_prefix(path);
|
||||||
std::string prefix = t.first;
|
const auto& prefix = t.first;
|
||||||
std::string npath = t.second;
|
const auto& npath = t.second;
|
||||||
|
|
||||||
// Find the component providing packet sources of the requested prefix.
|
// Find the component providing packet sources of the requested prefix.
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue