iosource/Manager: eliminate two std::string copies

This commit is contained in:
Max Kellermann 2020-02-10 09:44:36 +01:00
parent 20eb0e15c7
commit 4b8b6ec559

View file

@ -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)
{
std::pair<std::string, std::string> t = split_prefix(path);
std::string prefix = t.first;
std::string npath = t.second;
const auto& prefix = t.first;
const auto& npath = t.second;
// Find the component providing packet sources of the requested prefix.