diff options
Diffstat (limited to 'paludis/repositories/accounts/accounts_repository.cc')
-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 |