Skip to content

Commit

Permalink
(initialsol/simple.hpp) using enumeration on parameters
Browse files Browse the repository at this point in the history
  • Loading branch information
cvvergara committed Aug 25, 2024
1 parent 6d4fd64 commit 1a36c9f
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 4 deletions.
2 changes: 1 addition & 1 deletion include/initialsol/simple.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down
7 changes: 4 additions & 3 deletions src/initialsol/simple.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand All @@ -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<size_t> notused;

Expand Down

0 comments on commit 1a36c9f

Please sign in to comment.