From a5869415c0fa992ccfba64f9e2619983ec2f73c1 Mon Sep 17 00:00:00 2001 From: Ciaran McCreesh Date: Thu, 23 May 2013 23:59:27 +0100 Subject: Convert to fancy new visitors --- .../repositories/accounts/accounts_repository.cc | 45 +++++----------------- 1 file 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 &) const - { - return ! installed; - } - - bool visit(const SupportsActionTest &) const - { - return false; - } - - bool visit(const SupportsActionTest &) const - { - return false; - } - - bool visit(const SupportsActionTest &) const - { - return false; - } - - bool visit(const SupportsActionTest &) const - { - return false; - } - - bool visit(const SupportsActionTest &) const - { - return false; - } - - bool visit(const SupportsActionTest &) 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(q); + return a.make_accept_returning( + [&] (const SupportsActionTest &) { return ! _imp->params_if_installed; }, + [&] (const SupportsActionTest &) { return false; }, + [&] (const SupportsActionTest &) { return false; }, + [&] (const SupportsActionTest &) { return false; }, + [&] (const SupportsActionTest &) { return false; }, + [&] (const SupportsActionTest &) { return false; }, + [&] (const SupportsActionTest &) { return false; } + ); } bool -- cgit v1.2.3