Skip to content

Fix for_each_indexed util function#6151

Merged
mjjbell merged 1 commit intoProject-OSRM:masterfrom
mjjbell:mbell/fix_for_each_indexed
Dec 22, 2021
Merged

Fix for_each_indexed util function#6151
mjjbell merged 1 commit intoProject-OSRM:masterfrom
mjjbell:mbell/fix_for_each_indexed

Conversation

@mjjbell
Copy link
Copy Markdown
Member

@mjjbell mjjbell commented Oct 22, 2021

Issue

  • Fix typo in util function name for_each_indexed.
  • Use the overloaded functions for_each_indexed and for_each_pair
    with a container argument where possible to improve readability.

- Fix typo in util function name for_each_indexed.
- Use the overloaded functions for_each_indexed and for_each_pair
  with a container argument where possible to improve readability.

template <class ContainerT, typename Function>
void for_each_pair(ContainerT &container, Function function)
void for_each_indexed(ContainerT &container, Function function)
Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This overload was not being used in the codebase, so the typo went unnoticed.

Copy link
Copy Markdown
Member

@TheMarex TheMarex left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice!

@mjjbell mjjbell merged commit 04c2167 into Project-OSRM:master Dec 22, 2021
@mjjbell mjjbell deleted the mbell/fix_for_each_indexed branch December 22, 2021 23:40
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants