diff --git a/src/search/cartesian_abstractions/flaw.cc b/src/search/cartesian_abstractions/flaw.cc index 39cee53f2..c2edc5175 100644 --- a/src/search/cartesian_abstractions/flaw.cc +++ b/src/search/cartesian_abstractions/flaw.cc @@ -9,7 +9,7 @@ using namespace std; namespace cartesian_abstractions { -const FlawedState FlawedState::no_state = FlawedState(-1, -1u, {}); +const FlawedState FlawedState::no_state = FlawedState(-1, UNDEFINED_COST, {}); bool FlawedStates::is_consistent() const { return flawed_states_queue.size() == static_cast(flawed_states.size()); @@ -53,7 +53,7 @@ FlawedState FlawedStates::pop_random_flawed_state_and_clear(utils::RandomNumberG vector conc_states = move(random_bucket->second); clear(); assert(is_consistent()); - return FlawedState(abstract_state_id, -1u, move(conc_states)); + return FlawedState(abstract_state_id, UNDEFINED_COST, move(conc_states)); } int FlawedStates::num_abstract_states() const { diff --git a/src/search/cartesian_abstractions/types.h b/src/search/cartesian_abstractions/types.h index b50bc794f..0fa4bdd8b 100644 --- a/src/search/cartesian_abstractions/types.h +++ b/src/search/cartesian_abstractions/types.h @@ -25,11 +25,11 @@ using Loops = std::vector; using Solution = std::deque; using Transitions = std::vector; -const int UNDEFINED = -1; - // Positive infinity. The name "INFINITY" is taken by an ISO C99 macro. const int INF = std::numeric_limits::max(); +const int UNDEFINED = -1; const Cost INF_COSTS = std::numeric_limits::max(); +const Cost UNDEFINED_COST = std::numeric_limits::max() - 1; } #endif