Commit a88cbe5a authored by ehebrard's avatar ehebrard
Browse files

valgrind

parent 5ed4b5ff
......@@ -22,6 +22,10 @@ class ChoicePoint {
public:
int x;
int y;
bool isNone() const {
return x < 0;
}
const bool operator==(const ChoicePoint &cp) {
return cp.x == x and cp.y == y;
......@@ -505,7 +509,8 @@ template <class T> ChoicePoint Schedule<T>::selectChoicePoint() {
#ifdef TRACE
if (TRACE) {
cout << "select choice point: ";
if (cp == Schedule<T>::none)
// if (cp == Schedule<T>::none)
if(cp.isNone())
cout << "none";
else
displayChoicePoint(cout, cp);
......@@ -536,7 +541,8 @@ template <class T> void Schedule<T>::search() {
ChoicePoint cp{selectChoicePoint()};
if (cp == Schedule<T>::none) {
// if (cp == Schedule<T>::none) {
if (cp.isNone()) {
cout << "solution!\n";
exit(1);
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment