diff options
author | 2011-03-18 20:12:11 +0000 | |
---|---|---|
committer | 2011-03-18 20:12:11 +0000 | |
commit | d2eb3cd9f4b5e7fbf757e6101fe0d40a91d5f990 (patch) | |
tree | de88209c069784401c2737c600bb13791bb22518 | |
parent | 874d242a793bc8bfabd52977dea1a5d994ccab09 (diff) | |
download | paludis-d2eb3cd9f4b5e7fbf757e6101fe0d40a91d5f990.tar.gz paludis-d2eb3cd9f4b5e7fbf757e6101fe0d40a91d5f990.tar.xz |
Remove tightly coupled ctor
-rw-r--r-- | paludis/repositories/e/exheres_profile.cc | 4 | ||||
-rw-r--r-- | paludis/repositories/e/profile_file.cc | 14 | ||||
-rw-r--r-- | paludis/repositories/e/profile_file.hh | 1 | ||||
-rw-r--r-- | paludis/repositories/e/traditional_profile.cc | 6 |
4 files changed, 5 insertions, 20 deletions
diff --git a/paludis/repositories/e/exheres_profile.cc b/paludis/repositories/e/exheres_profile.cc index 9ec0d772a..6931b1e20 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 8de4cd0ac..d4a2fad00 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 3975e2f14..fdbec98c2 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 5b1eebbfd..51d5ca051 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>()), |