boostorg / graph

Boost.org graph module
http://boost.org/libs/graph
326 stars 208 forks source link

Fix conversion warning #302

Closed sebrockm closed 2 years ago

sebrockm commented 2 years ago

Fixes #293

Replaces int with the type returned by strong_components which is the value type of the provided component map. Also removes unneeded erase call.

jeremy-murphy commented 2 years ago

Hi @sebrockm , this looks great, thanks. Good catch of the redundant .erase -- I think a lot of people don't realize that it's an unnecessary step!

One thing -- could you please revert the Clang format commit? I really prefer to keep non-functional changes like formatting out of pull requests completely.

sebrockm commented 2 years ago

@jeremy-murphy Thanks for you reply! I fully agree that it's nicer to separate functional and non-functional changes. And of course can I revert it, that's why I made it a separate commit :) But separating it was actually a little effort because my editor automatically applies clang-format on file save.

Would a formatting-only PR make sense? It looks like there are some more files that are not fully in line with clang-format.

jeremy-murphy commented 2 years ago

Would a formatting-only PR make sense? It looks like there are some more files that are not fully in line with clang-format.

One day, yes, but it's just not a priority at the moment.