diff --git a/src/search/cost_saturation/uniform_cost_partitioning_heuristic.cc b/src/search/cost_saturation/uniform_cost_partitioning_heuristic.cc index 414d93eac..5d1ee5771 100644 --- a/src/search/cost_saturation/uniform_cost_partitioning_heuristic.cc +++ b/src/search/cost_saturation/uniform_cost_partitioning_heuristic.cc @@ -17,7 +17,7 @@ using namespace std; namespace cost_saturation { -static const double COST_FACTOR = 1000; +static const int COST_FACTOR = 1000; static vector divide_costs_among_remaining_abstractions( const vector> &abstractions, @@ -131,7 +131,7 @@ int ScaledCostPartitioningHeuristic::compute_heuristic(const State &ancestor_sta return DEAD_END; } double epsilon = 0.01; - return static_cast(ceil((result / COST_FACTOR) - epsilon)); + return static_cast(ceil((result / static_cast(COST_FACTOR)) - epsilon)); } @@ -142,7 +142,7 @@ shared_ptr get_scaled_costs_task(const shared_ptr &t cerr << "Overflowing cost : " << cost << endl; utils::exit_with(utils::ExitCode::SEARCH_CRITICAL_ERROR); } - cost = static_cast(cost * COST_FACTOR); + cost *= COST_FACTOR; } return make_shared(task, move(costs)); }