aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAvatar Ciaran McCreesh <ciaran.mccreesh@googlemail.com> 2011-03-18 20:12:11 +0000
committerAvatar Ciaran McCreesh <ciaran.mccreesh@googlemail.com> 2011-03-18 20:12:11 +0000
commitd2eb3cd9f4b5e7fbf757e6101fe0d40a91d5f990 (patch)
treede88209c069784401c2737c600bb13791bb22518
parent874d242a793bc8bfabd52977dea1a5d994ccab09 (diff)
downloadpaludis-d2eb3cd9f4b5e7fbf757e6101fe0d40a91d5f990.tar.gz
paludis-d2eb3cd9f4b5e7fbf757e6101fe0d40a91d5f990.tar.xz
Remove tightly coupled ctor
-rw-r--r--paludis/repositories/e/exheres_profile.cc4
-rw-r--r--paludis/repositories/e/profile_file.cc14
-rw-r--r--paludis/repositories/e/profile_file.hh1
-rw-r--r--paludis/repositories/e/traditional_profile.cc6
4 files changed, 5 insertions, 20 deletions
diff --git a/paludis/repositories/e/exheres_profile.cc b/paludis/repositories/e/exheres_profile.cc
index 9ec0d77..6931b1e 100644
--- a/paludis/repositories/e/exheres_profile.cc
+++ b/paludis/repositories/e/exheres_profile.cc
@@ -104,8 +104,8 @@ namespace paludis
n::environment() = e,
n::make_config_file() = &make_config_file
)),
- package_mask_file(p),
- packages_file(p),
+ package_mask_file(std::bind(&ERepository::eapi_for_file, p, std::placeholders::_1)),
+ packages_file(std::bind(&ERepository::eapi_for_file, p, std::placeholders::_1)),
use_expand(std::make_shared<Set<std::string>>()),
use_expand_hidden(std::make_shared<Set<std::string>>()),
use_expand_unprefixed(std::make_shared<Set<std::string>>()),
diff --git a/paludis/repositories/e/profile_file.cc b/paludis/repositories/e/profile_file.cc
index 8de4cd0..d4a2fad 100644
--- a/paludis/repositories/e/profile_file.cc
+++ b/paludis/repositories/e/profile_file.cc
@@ -180,20 +180,6 @@ ProfileFile<F_>::add_file(const FSPath & f)
}
}
-namespace
-{
- const std::string eapi_for_file(const ERepository * const repo, const FSPath & path)
- {
- return repo->eapi_for_file(path);
- }
-}
-
-template <typename F_>
-ProfileFile<F_>::ProfileFile(const ERepository * const repo) :
- _imp(std::bind(eapi_for_file, repo, std::placeholders::_1))
-{
-}
-
template <typename F_>
ProfileFile<F_>::ProfileFile(const EAPIForFileFunction & f) :
_imp(f)
diff --git a/paludis/repositories/e/profile_file.hh b/paludis/repositories/e/profile_file.hh
index 3975e2f..fdbec98 100644
--- a/paludis/repositories/e/profile_file.hh
+++ b/paludis/repositories/e/profile_file.hh
@@ -46,7 +46,6 @@ namespace paludis
///\{
explicit ProfileFile(const EAPIForFileFunction &);
- explicit ProfileFile(const ERepository * const);
~ProfileFile();
diff --git a/paludis/repositories/e/traditional_profile.cc b/paludis/repositories/e/traditional_profile.cc
index 5b1eebb..51d5ca0 100644
--- a/paludis/repositories/e/traditional_profile.cc
+++ b/paludis/repositories/e/traditional_profile.cc
@@ -190,9 +190,9 @@ namespace paludis
Imp(const Environment * const e, const ERepository * const p,
const RepositoryName & name, const FSPathSequence & dirs,
const std::string & arch_var_if_special, const bool profiles_explicitly_set) :
- packages_file(p),
- virtuals_file(p),
- package_mask_file(p),
+ packages_file(std::bind(&ERepository::eapi_for_file, p, std::placeholders::_1)),
+ virtuals_file(std::bind(&ERepository::eapi_for_file, p, std::placeholders::_1)),
+ package_mask_file(std::bind(&ERepository::eapi_for_file, p, std::placeholders::_1)),
env(e),
repository(p),
profiles_with_parents(std::make_shared<FSPathSequence>()),