Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Simplify Task::orders_ vector #183

Open
janagoe opened this issue Feb 12, 2024 · 0 comments
Open

Simplify Task::orders_ vector #183

janagoe opened this issue Feb 12, 2024 · 0 comments
Labels

Comments

@janagoe
Copy link
Member

janagoe commented Feb 12, 2024

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?

@janagoe janagoe added the cpps label Feb 12, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant