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

Fix warning: unused variable in diffusion.hpp #635

Merged
merged 1 commit into from
Feb 6, 2022

Conversation

mloskot
Copy link
Member

@mloskot mloskot commented Feb 5, 2022

Description

@simmplecoder Could you confirm these were just unused and not meant to be used but overlooked?

../../boost/gil/image_processing/diffusion.hpp:160:14: warning: unused variable ‘first’ [-Wunused-variable]
  160 |         auto first = stencil.begin();
      |              ^~~~~
../../boost/gil/image_processing/diffusion.hpp:161:14: warning: unused variable ‘last’ [-Wunused-variable]
  161 |         auto last = stencil.end();
      |              ^~~~

Tasklist

  • Review and approve

@mloskot mloskot added the cat/annoyance Not a bug, not a feature, but something that should be improved label Feb 5, 2022
@simmplecoder
Copy link
Contributor

It seems like I wanted to add a warning or error if the stencil is not of the correct size (it should be typical 9 pixel window), but backtracked on that because the function is usually called in a loop and rarely used on its own. If the error message is not needed, then it is safe to merge this. The reduction looks correct (it is 5 connectivity, diagonals and the center).

@mloskot mloskot merged commit 5dcdf53 into boostorg:develop Feb 6, 2022
@mloskot mloskot deleted the ml/fix-unused-variable branch April 12, 2022 17:24
@mloskot mloskot mentioned this pull request May 12, 2022
6 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
cat/annoyance Not a bug, not a feature, but something that should be improved
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants