aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAvatar Ciaran McCreesh <ciaran.mccreesh@googlemail.com> 2012-04-15 14:51:10 +0100
committerAvatar Ciaran McCreesh <ciaran.mccreesh@googlemail.com> 2012-04-15 14:51:10 +0100
commitabea5c65aaf373efe4522fcac78e571300be0605 (patch)
treec12171cf70dab0c992d3805dc15c15fb54ce8b4f
parent0eba37612dad62dc675f082d15d7d07aa91fc590 (diff)
downloadpaludis-abea5c65aaf373efe4522fcac78e571300be0605.tar.gz
paludis-abea5c65aaf373efe4522fcac78e571300be0605.tar.xz
Use ctors explicitly in pairs
-rw-r--r--paludis/repositories/e/exheres_layout.cc4
-rw-r--r--paludis/repositories/e/traditional_layout.cc6
-rw-r--r--paludis/repositories/e/traditional_profile.cc6
-rw-r--r--paludis/repositories/e/use_desc.cc5
4 files changed, 11 insertions, 10 deletions
diff --git a/paludis/repositories/e/exheres_layout.cc b/paludis/repositories/e/exheres_layout.cc
index 54b0553..7891ce5 100644
--- a/paludis/repositories/e/exheres_layout.cc
+++ b/paludis/repositories/e/exheres_layout.cc
@@ -170,9 +170,9 @@ ExheresLayout::ExheresLayout(const Environment * const e, const ERepository * co
std::string p(strip_trailing_string(strip_trailing_string(d->basename(), ".conf"), ".local"));
if (p == "options")
- _imp->use_desc_files->push_back(std::make_pair(*d, ""));
+ _imp->use_desc_files->push_back(std::make_pair(*d, ChoicePrefixName("")));
else
- _imp->use_desc_files->push_back(std::make_pair(*d, p));
+ _imp->use_desc_files->push_back(std::make_pair(*d, ChoicePrefixName(p)));
}
}
}
diff --git a/paludis/repositories/e/traditional_layout.cc b/paludis/repositories/e/traditional_layout.cc
index fec622e..41c5888 100644
--- a/paludis/repositories/e/traditional_layout.cc
+++ b/paludis/repositories/e/traditional_layout.cc
@@ -161,8 +161,8 @@ TraditionalLayout::TraditionalLayout(
_imp->info_variables_files->push_back(_imp->tree_root / "profiles" / "info_vars");
_imp->info_packages_files->push_back(_imp->tree_root / "profiles" / "info_pkgs");
- _imp->use_desc_files->push_back(std::make_pair(_imp->tree_root / "profiles" / "use.desc", ""));
- _imp->use_desc_files->push_back(std::make_pair(_imp->tree_root / "profiles" / "use.local.desc", ""));
+ _imp->use_desc_files->push_back(std::make_pair(_imp->tree_root / "profiles" / "use.desc", ChoicePrefixName("")));
+ _imp->use_desc_files->push_back(std::make_pair(_imp->tree_root / "profiles" / "use.local.desc", ChoicePrefixName("")));
FSPath descs(_imp->tree_root / "profiles" / "desc");
if (descs.stat().is_directory_or_symlink_to_directory())
{
@@ -170,7 +170,7 @@ TraditionalLayout::TraditionalLayout(
{
if (! is_file_with_extension(*d, ".desc", { }))
continue;
- _imp->use_desc_files->push_back(std::make_pair(*d, strip_trailing_string(d->basename(), ".desc")));
+ _imp->use_desc_files->push_back(std::make_pair(*d, ChoicePrefixName(strip_trailing_string(d->basename(), ".desc"))));
}
}
}
diff --git a/paludis/repositories/e/traditional_profile.cc b/paludis/repositories/e/traditional_profile.cc
index ad1de0b..7f80f55 100644
--- a/paludis/repositories/e/traditional_profile.cc
+++ b/paludis/repositories/e/traditional_profile.cc
@@ -363,7 +363,7 @@ namespace
tokenise_whitespace(_imp->environment_variables[use_var], std::back_inserter(tokens));
for (std::list<std::string>::const_iterator t(tokens.begin()), t_end(tokens.end()) ;
t != t_end ; ++t)
- _imp->use.insert(std::make_pair("", *t));
+ _imp->use.insert(std::make_pair(ChoicePrefixName(""), UnprefixedChoiceName(*t)));
}
}
catch (const InternalError &)
@@ -427,7 +427,7 @@ namespace
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()) ;
u != u_end ; ++u)
- _imp->use.insert(std::make_pair(lower_x, *u));
+ _imp->use.insert(std::make_pair(ChoicePrefixName(lower_x), UnprefixedChoiceName(*u)));
}
}
@@ -468,7 +468,7 @@ namespace
{
std::string arch(arch_s);
- _imp->use.insert(std::make_pair(ChoicePrefixName(""), arch));
+ _imp->use.insert(std::make_pair(ChoicePrefixName(""), UnprefixedChoiceName(arch)));
_imp->stacked_values_list.back().use_force[ChoiceNameWithPrefix(arch)] = true;
}
catch (const InternalError &)
diff --git a/paludis/repositories/e/use_desc.cc b/paludis/repositories/e/use_desc.cc
index d5f919c..f6e2830 100644
--- a/paludis/repositories/e/use_desc.cc
+++ b/paludis/repositories/e/use_desc.cc
@@ -62,9 +62,10 @@ namespace paludis
std::string::size_type q(lhs.find(':'));
if (std::string::npos == q)
- global_descs.insert(make_pair(make_pair(prefix, lhs), rhs));
+ global_descs.insert(std::make_pair(std::make_pair(ChoicePrefixName(prefix), UnprefixedChoiceName(lhs)), rhs));
else
- local_descs[QualifiedPackageName(lhs.substr(0, q))].insert(make_pair(make_pair(prefix, lhs.substr(q + 1)), rhs));
+ local_descs[QualifiedPackageName(lhs.substr(0, q))].insert(
+ std::make_pair(std::make_pair(ChoicePrefixName(prefix), UnprefixedChoiceName(lhs.substr(q + 1))), rhs));
}
}
}