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.
This commit is contained in:
Saleem Abdulrasool 2016-12-11 15:28:53 -08:00
parent be4e3f21e4
commit 98edb4e4b0

@ -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>());