aboutsummaryrefslogtreecommitdiff
path: root/paludis
diff options
context:
space:
mode:
authorAvatar Saleem Abdulrasool <compnerd@compnerd.org> 2016-12-11 15:28:53 -0800
committerAvatar Saleem Abdulrasool <compnerd@compnerd.org> 2016-12-11 15:28:53 -0800
commit98edb4e4b00356c76dc505bc9ae8d181bf9e0d08 (patch)
tree9af4ed8b57cf6a24aec7d2632e76e9d45c8f24b3 /paludis
parentbe4e3f21e4465fba00571b547050d0b8c0350589 (diff)
downloadpaludis-98edb4e4b00356c76dc505bc9ae8d181bf9e0d08.tar.gz
paludis-98edb4e4b00356c76dc505bc9ae8d181bf9e0d08.tar.xz
repositories: avoid a shadowing warning
The string is used in one place, inline it. It is passed as an argument and the life time will be extended around the call.
Diffstat (limited to 'paludis')
-rw-r--r--paludis/repositories/e/parse_dependency_label.cc10
1 files changed, 4 insertions, 6 deletions
diff --git a/paludis/repositories/e/parse_dependency_label.cc b/paludis/repositories/e/parse_dependency_label.cc
index fde8e04..0cdbd80 100644
--- a/paludis/repositories/e/parse_dependency_label.cc
+++ b/paludis/repositories/e/parse_dependency_label.cc
@@ -160,10 +160,9 @@ namespace
}
std::shared_ptr<DependenciesLabelsDepSpec>
-paludis::erepository::parse_dependency_label(
- const Environment * const,
- const std::string & s,
- const EAPI & e)
+paludis::erepository::parse_dependency_label(const Environment * const,
+ const std::string & s,
+ const EAPI & e)
{
Context context("When parsing label string '" + s + "' using EAPI '" + e.name() + "':");
@@ -171,8 +170,7 @@ paludis::erepository::parse_dependency_label(
throw EDepParseError(s, "Empty label");
std::set<std::string> labels;
- std::string label(s.substr(0, s.length() - 1));
- tokenise<delim_kind::AnyOfTag, delim_mode::DelimiterTag>(label, "+", "", std::inserter(labels, labels.end()));
+ tokenise<delim_kind::AnyOfTag, delim_mode::DelimiterTag>(s.substr(0, s.length() - 1), "+", "", std::inserter(labels, labels.end()));
std::shared_ptr<DependenciesLabelsDepSpec> l(std::make_shared<DependenciesLabelsDepSpec>());