diff options
author | 2013-05-23 23:59:27 +0100 | |
---|---|---|
committer | 2013-05-23 23:59:27 +0100 | |
commit | a5869415c0fa992ccfba64f9e2619983ec2f73c1 (patch) | |
tree | 1ad0569aacc92db8517c49b44468b7233162bcde | |
parent | 9689c7a0e13774792f9076b2930ebb1d901eec06 (diff) | |
download | paludis-a5869415c0fa992ccfba64f9e2619983ec2f73c1.tar.gz paludis-a5869415c0fa992ccfba64f9e2619983ec2f73c1.tar.xz |
Convert to fancy new visitors
-rw-r--r-- | paludis/repositories/accounts/accounts_repository.cc | 45 |
1 files changed, 9 insertions, 36 deletions
diff --git a/paludis/repositories/accounts/accounts_repository.cc b/paludis/repositories/accounts/accounts_repository.cc index 91aeff753..e18db9d7c 100644 --- a/paludis/repositories/accounts/accounts_repository.cc +++ b/paludis/repositories/accounts/accounts_repository.cc @@ -335,48 +335,21 @@ namespace { } - bool visit(const SupportsActionTest<InstallAction> &) const - { - return ! installed; - } - - bool visit(const SupportsActionTest<FetchAction> &) const - { - return false; - } - - bool visit(const SupportsActionTest<PretendFetchAction> &) const - { - return false; - } - - bool visit(const SupportsActionTest<ConfigAction> &) const - { - return false; - } - - bool visit(const SupportsActionTest<PretendAction> &) const - { - return false; - } - - bool visit(const SupportsActionTest<InfoAction> &) const - { - return false; - } - - bool visit(const SupportsActionTest<UninstallAction> &) const - { - return false; - } }; } bool AccountsRepository::some_ids_might_support_action(const SupportsActionTestBase & a) const { - SupportsActionQuery q(bool(_imp->params_if_installed)); - return a.accept_returning<bool>(q); + return a.make_accept_returning( + [&] (const SupportsActionTest<InstallAction> &) { return ! _imp->params_if_installed; }, + [&] (const SupportsActionTest<FetchAction> &) { return false; }, + [&] (const SupportsActionTest<PretendFetchAction> &) { return false; }, + [&] (const SupportsActionTest<ConfigAction> &) { return false; }, + [&] (const SupportsActionTest<PretendAction> &) { return false; }, + [&] (const SupportsActionTest<InfoAction> &) { return false; }, + [&] (const SupportsActionTest<UninstallAction> &) { return false; } + ); } bool |