Skip to content

Commit

Permalink
Use template to avoid code duplication.
Browse files Browse the repository at this point in the history
  • Loading branch information
tanjaschindler committed Nov 25, 2024
1 parent 5d2e7e9 commit cd034bf
Showing 1 changed file with 2 additions and 7 deletions.
9 changes: 2 additions & 7 deletions src/search/tasks/root_task.cc
Original file line number Diff line number Diff line change
Expand Up @@ -120,13 +120,8 @@ static void check_fact(const FactPair &fact, const vector<ExplicitVariable> &var
}
}

static void check_facts(const vector<FactPair> &facts, const vector<ExplicitVariable> &variables) {
for (FactPair fact : facts) {
check_fact(fact, variables);
}
}

static void check_facts(const set<FactPair> &facts, const vector<ExplicitVariable> &variables) {
template<typename T>
static void check_facts(const T &facts, const vector<ExplicitVariable> &variables) {
for (FactPair fact : facts) {
check_fact(fact, variables);
}
Expand Down

0 comments on commit cd034bf

Please sign in to comment.