aboutsummaryrefslogtreecommitdiff
path: root/paludis/repositories/e
diff options
context:
space:
mode:
Diffstat (limited to 'paludis/repositories/e')
-rw-r--r--paludis/repositories/e/e_choices_key.cc10
-rw-r--r--paludis/repositories/e/ebuild_id.cc5
-rw-r--r--paludis/repositories/e/fetch_visitor.cc5
-rw-r--r--paludis/repositories/e/traditional_profile.cc15
4 files changed, 12 insertions, 23 deletions
diff --git a/paludis/repositories/e/e_choices_key.cc b/paludis/repositories/e/e_choices_key.cc
index c02f5542a..9f75658be 100644
--- a/paludis/repositories/e/e_choices_key.cc
+++ b/paludis/repositories/e/e_choices_key.cc
@@ -39,6 +39,7 @@
#include <paludis/util/make_named_values.hh>
#include <paludis/util/indirect_iterator-impl.hh>
#include <paludis/util/accept_visitor.hh>
+#include <paludis/util/upper_lower.hh>
#include <paludis/environment.hh>
#include <paludis/choice.hh>
@@ -115,8 +116,7 @@ namespace
bool operator() (const std::string & s) const
{
- std::string lower_s;
- std::transform(s.begin(), s.end(), std::back_inserter(lower_s), &::tolower);
+ std::string lower_s(tolower(s));
lower_s.append(delim);
return (0 == flag.value().compare(0, lower_s.length(), lower_s, 0, lower_s.length()));
}
@@ -310,8 +310,7 @@ EChoicesKey::populate_myoptions() const
{
Context local_local_context("When using raw_use_expand_key value '" + *u + "' to populate choices:");
- std::string lower_u;
- std::transform(u->begin(), u->end(), std::back_inserter(lower_u), &::tolower);
+ std::string lower_u(tolower(*u));
std::shared_ptr<Choice> exp(std::make_shared<Choice>(make_named_values<ChoiceParams>(
n::consider_added_or_changed() = true,
n::contains_every_value() = false,
@@ -504,8 +503,7 @@ EChoicesKey::populate_iuse(const std::shared_ptr<const Map<ChoiceNameWithPrefix,
for (Set<std::string>::ConstIterator u(raw_use_expand->begin()), u_end(raw_use_expand->end()) ;
u != u_end ; ++u)
{
- std::string lower_u;
- std::transform(u->begin(), u->end(), std::back_inserter(lower_u), &::tolower);
+ std::string lower_u(tolower(*u));
std::shared_ptr<Choice> exp(std::make_shared<Choice>(make_named_values<ChoiceParams>(
n::consider_added_or_changed() = true,
n::contains_every_value() = ! _imp->id->eapi()->supported()->ebuild_options()->require_use_expand_in_iuse(),
diff --git a/paludis/repositories/e/ebuild_id.cc b/paludis/repositories/e/ebuild_id.cc
index 3fd6154bc..2f7d5c28e 100644
--- a/paludis/repositories/e/ebuild_id.cc
+++ b/paludis/repositories/e/ebuild_id.cc
@@ -68,6 +68,7 @@
#include <paludis/util/accept_visitor.hh>
#include <paludis/util/fs_stat.hh>
#include <paludis/util/join.hh>
+#include <paludis/util/upper_lower.hh>
#include <set>
#include <iterator>
@@ -387,9 +388,7 @@ EbuildID::need_non_xml_keys_added() const
x_end(e_repo->profile()->use_expand_implicit()->end()) ;
x != x_end ; ++x)
{
- std::string lower_x;
- std::transform(x->begin(), x->end(), std::back_inserter(lower_x), &::tolower);
-
+ std::string lower_x(tolower(*x));
bool prefixed(use_expand->end() != use_expand->find(*x));
bool unprefixed(use_expand_unprefixed->end() != use_expand_unprefixed->find(*x));
diff --git a/paludis/repositories/e/fetch_visitor.cc b/paludis/repositories/e/fetch_visitor.cc
index 9296084b6..333fd1fa9 100644
--- a/paludis/repositories/e/fetch_visitor.cc
+++ b/paludis/repositories/e/fetch_visitor.cc
@@ -42,6 +42,7 @@
#include <paludis/util/fs_path.hh>
#include <paludis/util/fs_stat.hh>
#include <paludis/util/env_var_names.hh>
+#include <paludis/util/upper_lower.hh>
#include <algorithm>
#include <list>
@@ -148,9 +149,7 @@ namespace
{
FSPath make_fetcher(const FSPath & d, const std::string & x)
{
- std::string lower_x;
- std::transform(x.begin(), x.end(), std::back_inserter(lower_x), &::tolower);
- return d / ("do" + lower_x);
+ return d / ("do" + tolower(x));
}
}
diff --git a/paludis/repositories/e/traditional_profile.cc b/paludis/repositories/e/traditional_profile.cc
index ba9b8f939..ad1de0b57 100644
--- a/paludis/repositories/e/traditional_profile.cc
+++ b/paludis/repositories/e/traditional_profile.cc
@@ -44,6 +44,7 @@
#include <paludis/util/fs_stat.hh>
#include <paludis/util/fs_error.hh>
#include <paludis/util/make_null_shared_ptr.hh>
+#include <paludis/util/upper_lower.hh>
#include <paludis/choice.hh>
#include <paludis/environment.hh>
@@ -60,7 +61,6 @@
#include <vector>
#include <strings.h>
-#include <ctype.h>
using namespace paludis;
using namespace paludis::erepository;
@@ -422,9 +422,7 @@ namespace
for (Set<std::string>::ConstIterator x(_imp->use_expand->begin()), x_end(_imp->use_expand->end()) ;
x != x_end ; ++x)
{
- std::string lower_x;
- std::transform(x->begin(), x->end(), std::back_inserter(lower_x), &::tolower);
-
+ std::string lower_x(tolower(*x));
std::list<std::string> uses;
tokenise_whitespace(_imp->environment_variables[stringify(*x)], std::back_inserter(uses));
for (std::list<std::string>::const_iterator u(uses.begin()), u_end(uses.end()) ;
@@ -440,11 +438,7 @@ namespace
for (Set<std::string>::ConstIterator x(_imp->use_expand->begin()), x_end(_imp->use_expand->end()) ;
x != x_end ; ++x)
- {
- std::string lower_x;
- std::transform(x->begin(), x->end(), std::back_inserter(lower_x), &::tolower);
- _imp->known_choice_value_names.insert(std::make_pair(lower_x, std::make_shared<Set<UnprefixedChoiceName>>()));
- }
+ _imp->known_choice_value_names.insert(std::make_pair(tolower(*x), std::make_shared<Set<UnprefixedChoiceName>>()));
for (std::set<std::pair<ChoicePrefixName, UnprefixedChoiceName> >::const_iterator u(_imp->use.begin()), u_end(_imp->use.end()) ;
u != u_end ; ++u)
@@ -932,8 +926,7 @@ TraditionalProfile::known_choice_value_names(
if (_imp->known_choice_value_names_for_separator.end() == it)
it = _imp->known_choice_value_names_for_separator.insert(std::make_pair(separator, KnownMap())).first;
- std::string lower_x;
- std::transform(choice->raw_name().begin(), choice->raw_name().end(), std::back_inserter(lower_x), &::tolower);
+ std::string lower_x(tolower(choice->raw_name()));
KnownMap::const_iterator it2(it->second.find(lower_x));
if (it->second.end() == it2)
{