Skip to content

Commit

Permalink
Use init-statement.
Browse files Browse the repository at this point in the history
  • Loading branch information
jcoupey committed Oct 29, 2024
1 parent cc24f76 commit 0740c07
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions src/structures/vroom/input/input.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -605,9 +605,8 @@ void Input::set_vehicles_costs() {
}

void Input::set_vehicles_max_tasks() {
const auto amount_size = get_amount_size();

if (_has_jobs && !_has_shipments && amount_size > 0) {
if (const auto amount_size = get_amount_size();
_has_jobs && !_has_shipments && amount_size > 0) {
// For job-only instances where capacity restrictions apply:
// compute an upper bound of the number of jobs for each vehicle
// based on pickups load and delivery loads. This requires sorting
Expand Down

0 comments on commit 0740c07

Please sign in to comment.