From cd034bf45133e3a8360f06fdc4ff9b2c24be478d Mon Sep 17 00:00:00 2001 From: tanjaschindler Date: Mon, 25 Nov 2024 16:09:43 +0100 Subject: [PATCH] Use template to avoid code duplication. --- src/search/tasks/root_task.cc | 9 ++------- 1 file changed, 2 insertions(+), 7 deletions(-) diff --git a/src/search/tasks/root_task.cc b/src/search/tasks/root_task.cc index aeaf81b40f..e2b7be489a 100644 --- a/src/search/tasks/root_task.cc +++ b/src/search/tasks/root_task.cc @@ -120,13 +120,8 @@ static void check_fact(const FactPair &fact, const vector &var } } -static void check_facts(const vector &facts, const vector &variables) { - for (FactPair fact : facts) { - check_fact(fact, variables); - } -} - -static void check_facts(const set &facts, const vector &variables) { +template +static void check_facts(const T &facts, const vector &variables) { for (FactPair fact : facts) { check_fact(fact, variables); }