From 4b8b6ec559a337e10224ec2b6c68273a8b9fab43 Mon Sep 17 00:00:00 2001 From: Max Kellermann Date: Mon, 10 Feb 2020 09:44:36 +0100 Subject: [PATCH] iosource/Manager: eliminate two std::string copies --- src/iosource/Manager.cc | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/iosource/Manager.cc b/src/iosource/Manager.cc index 1161171743..b6c9b6663c 100644 --- a/src/iosource/Manager.cc +++ b/src/iosource/Manager.cc @@ -324,8 +324,8 @@ static std::pair split_prefix(std::string path) PktSrc* Manager::OpenPktSrc(const std::string& path, bool is_live) { std::pair 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.