Skip to content

Simplify Task::orders_ vector #183

@janagoe

Description

@janagoe

Some code to access the Task::orders_ vector and the usage for order_index_ is complicated, for example

  if (task_.getOrders().size() >= order_index_) {
    order_index_ = -1;
    send_next_task_to_physical_ = true;
  }

I assume that the index is set to -1 so that in the next iteration/call it is increased again to 0 to always access the first element?

Maybe this could be simplified with something like a std::deque?

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions