Skip to content

Commit

Permalink
[issue1082] restore destructors
Browse files Browse the repository at this point in the history
  • Loading branch information
SimonDold committed Feb 1, 2024
1 parent 770cc27 commit f03ba76
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 1 deletion.
3 changes: 3 additions & 0 deletions src/search/heuristic.cc
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,9 @@ Heuristic::Heuristic(const plugins::Options &opts)
task_proxy(*task) {
}

Heuristic::~Heuristic() {
}

void Heuristic::set_preferred(const OperatorProxy &op) {
preferred_operators.insert(op.get_ancestor_operator_id(tasks::g_root_task.get()));
}
Expand Down
2 changes: 1 addition & 1 deletion src/search/heuristic.h
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@
#include "task_proxy.h"

#include "algorithms/ordered_set.h"
#include "tasks/root_task.h"

#include <memory>
#include <vector>
Expand Down Expand Up @@ -79,6 +78,7 @@ class Heuristic : public Evaluator {
const std::string &name,
utils::Verbosity verbosity);
explicit Heuristic(const plugins::Options &opts);
virtual ~Heuristic() override;

This comment has been minimized.

Copy link
@FlorianPommerening

FlorianPommerening Feb 1, 2024

Member

Do we need the destructor? and is there a reason why we cannot use = default? I thought our convention was to leave it out if it is using its default?

This comment has been minimized.

Copy link
@SimonDold

SimonDold Feb 2, 2024

Author Contributor

I tried to keep the diff to main small.
I am fine with removing it with this issue but did not see it inside the scope of this issue so far.


virtual void get_path_dependent_evaluators(
std::set<Evaluator *> & /*evals*/) override {
Expand Down
3 changes: 3 additions & 0 deletions src/search/heuristics/blind_search_heuristic.cc
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,9 @@ BlindSearchHeuristic::BlindSearchHeuristic(const shared_ptr<AbstractTask> &trans
}
}

BlindSearchHeuristic::~BlindSearchHeuristic() {
}

int BlindSearchHeuristic::compute_heuristic(const State &ancestor_state) {
State state = convert_ancestor_state(ancestor_state);
if (task_properties::is_goal_state(task_proxy, state))
Expand Down
1 change: 1 addition & 0 deletions src/search/heuristics/blind_search_heuristic.h
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ class BlindSearchHeuristic : public Heuristic {
bool cache_estimates,
const std::string &name,
utils::Verbosity verbosity);
~BlindSearchHeuristic();
};
}

Expand Down

0 comments on commit f03ba76

Please sign in to comment.