diff --git a/include/initialsol/simple.hpp b/include/initialsol/simple.hpp index e96f89a49..e4d98d9fe 100644 --- a/include/initialsol/simple.hpp +++ b/include/initialsol/simple.hpp @@ -55,7 +55,7 @@ class Initial_solution : public problem::Solution { */ void one_truck_all_orders(); - void do_while_foo(int kind); + void do_while_foo(Initials_code); void do_while_feasible( problem::Vehicle_pickDeliver& truck, diff --git a/src/initialsol/simple.cpp b/src/initialsol/simple.cpp index 96394b3db..abcf572c7 100644 --- a/src/initialsol/simple.cpp +++ b/src/initialsol/simple.cpp @@ -52,7 +52,7 @@ Initial_solution::Initial_solution( unassigned(m_orders.size()), assigned() { invariant(); - pgassert(kind >= 0 && kind <= OneDepot); + pgassert(kind >= OneTruck && kind <= OneDepot); switch (kind) { case OneTruck: @@ -74,9 +74,10 @@ Initial_solution::Initial_solution( } void -Initial_solution::do_while_foo(int kind) { +Initial_solution::do_while_foo(Initials_code kind) { invariant(); - pgassert(kind > 0 && kind <= OneDepot); + pgassert(kind != OneTruck); + pgassert(kind > OneTruck && kind <= OneDepot); Identifiers notused;